Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/crypto/aes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class AESChiperSelector{
return AESCipher128();
case KEY_LENGTH.s192:
_log.finer("AES chiper with 192-bit key size selected.");
return AESCipher128();
return AESCipher192();
case KEY_LENGTH.s256:
_log.finer("AES chiper with 256-bit key size selected.");
return AESCipher256();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/proto/pace.dart
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ class PACE {

if (cipherAlgo == CipherAlgorithm.AES){
_log.debug("PACE.decryptNonce; Cipher algorithm: AES");
AESCipher aesCipher128 = AESChiperSelector.getChiper(size: KEY_LENGTH.s128);
Uint8List decryptedNonce = aesCipher128.decrypt(data: nonce, key: k_pi);
AESCipher aesCipher = AESChiperSelector.getChiper(size: keyLength);
Uint8List decryptedNonce = aesCipher.decrypt(data: nonce, key: k_pi);
_log.sdVerbose("PACE.decryptNonce; Decrypted nonce: ${decryptedNonce.hex()}");
return decryptedNonce;
}
Expand Down