Skip to content

Commit 7596f2c

Browse files
committed
FIX: modified TODO text as it does not make sense to create random IV in the AES encryption;
+ Better formating of the header
1 parent 3d5f32f commit 7596f2c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/core/n-crypt.c

+8-7
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,14 @@ REBNATIVE(rc4)
9393
//
9494
// "Encrypt/decrypt data using AES algorithm. Returns stream cipher context handle or encrypted/decrypted data."
9595
//
96-
// /key "Provided only for the first time to get stream HANDLE!."
97-
// crypt-key [binary!] "Crypt key (16 or 32 bytes)."
98-
// iv [binary! none!] "Optional initialization vector (16 bytes)."
99-
// /decrypt "Use the crypt-key for decryption (default is to encrypt)"
96+
// /key "Provided only for the first time to get stream HANDLE!."
97+
// crypt-key [binary!] "Crypt key (16 or 32 bytes)."
98+
// iv [none! binary!] "Optional initialization vector (16 bytes)."
99+
// /decrypt "Use the crypt-key for decryption (default is to encrypt)"
100100
// /stream
101-
// ctx [handle!] "Stream cipher context."
102-
// data [binary!] "Data to encrypt/decrypt. Or NONE to close the cipher stream."
101+
// ctx [handle!] "Stream cipher context."
102+
// data [binary!] "Data to encrypt/decrypt. Or NONE to close the cipher stream."
103+
103104
// ]
104105
REBNATIVE(aes)
105106
{
@@ -127,7 +128,7 @@ REBNATIVE(aes)
127128
}
128129
memcpy(iv, VAL_BIN_AT(val_iv), AES_IV_SIZE);
129130
} else {
130-
//TODO: provide some random IV or use ECB encryption if IV is not specified
131+
//TODO: Use ECB encryption if IV is not specified
131132
memset(iv, 0, AES_IV_SIZE);
132133
}
133134

0 commit comments

Comments
 (0)