|
153 | 153 | -- @param k A 16-byte or 32-byte sequence representing the secret key. |
154 | 154 | -- @param v An 8-byte sequence representing the nonce. |
155 | 155 | -- @param i An 8-byte sequence representing the stream position of the 64-byte block. |
156 | | --- @param rounds Optional number of rounds. My be 20 (default), 12, or 8. |
| 156 | +-- @param rounds Optional number of rounds. May be 20 (default), 12, or 8. |
157 | 157 | -- @return A 64-byte output block. |
158 | 158 | function salsa20.generate(k, v, i, rounds) |
159 | 159 | assert(#k == 16 or #k == 32) |
|
171 | 171 | -- @param key A 16-octet or 32-octet bytestring. |
172 | 172 | -- @param nonce An 8-octet bytestring nonce. |
173 | 173 | -- @param plaintext The unencrypted message. |
174 | | --- @param rounds Optional number of rounds. My be 20 (default), 12, or 8. |
| 174 | +-- @param rounds Optional number of rounds. May be 20 (default), 12, or 8. |
175 | 175 | -- @return The encrypted message. |
176 | 176 | function salsa20.encrypt(key, nonce, plaintext, rounds) |
177 | 177 | assert(type(key) == "string" and (key:len() == 16 or key:len() == 32)) |
|
199 | 199 | -- @param key A 16-octet or 32-octet bytestring. |
200 | 200 | -- @param nonce An 8-octet bytestring nonce. |
201 | 201 | -- @param ciphertext The encrypted message. |
202 | | --- @param rounds Optional number of rounds. My be 20 (default), 12, or 8. |
| 202 | +-- @param rounds Optional number of rounds. May be 20 (default), 12, or 8. |
203 | 203 | -- @return The unencrypted message. |
204 | 204 | function salsa20.decrypt(key, nonce, ciphertext, rounds) |
205 | 205 | -- The easiest thing I've done all week. |
|
210 | 210 | -- @param key A 16-octet or 32-octet bytestring. |
211 | 211 | -- @param nonce An 8-octet bytestring nonce. |
212 | 212 | -- @param plaintext The unencrypted messages. |
213 | | --- @param rounds Optional number of rounds. My be 20 (default), 12, or 8. |
| 213 | +-- @param rounds Optional number of rounds. May be 20 (default), 12, or 8. |
214 | 214 | -- @return The encrypted messages. |
215 | 215 | function salsa20.encrypt_table(key, nonce, plaintext, rounds) |
216 | 216 | assert(type(key) == "string" and (key:len() == 16 or key:len() == 32)) |
|
242 | 242 | -- @param key A 16-octet or 32-octet bytestring. |
243 | 243 | -- @param nonce An 8-octet bytestring nonce. |
244 | 244 | -- @param ciphertext The encrypted messages. |
245 | | --- @param rounds Optional number of rounds. My be 20 (default), 12, or 8. |
| 245 | +-- @param rounds Optional number of rounds. May be 20 (default), 12, or 8. |
246 | 246 | -- @return The unencrypted messages. |
247 | 247 | function salsa20.decrypt_table(key, nonce, ciphertext, rounds) |
248 | 248 | -- The second easiest thing I've done all week. |
|
0 commit comments