mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
AES encrypt also allows word arrays (#27569)
the following code will execute fine, but typescript doesn't recognize it as valid
var input = CryptoJS.lib.WordArray.create(new Uint8Array(5));
var encrypted = CryptoJS.AES.encrypt(input, secretKeyString, {
iv: CryptoJS.enc.Hex.parse('00000000000000000000000000000000'),
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
This commit is contained in:
Vendored
+1
-1
@@ -29,7 +29,7 @@ declare namespace CryptoJS {
|
||||
interface StreamCipher extends Cipher {}
|
||||
|
||||
interface CipherHelper {
|
||||
encrypt(message: string, secretPassphrase: string | WordArray, option?: CipherOption): WordArray;
|
||||
encrypt(message: string | LibWordArray, secretPassphrase: string | WordArray, option?: CipherOption): WordArray;
|
||||
decrypt(encryptedMessage: string | WordArray, secretPassphrase: string | WordArray, option?: CipherOption): DecryptedMessage;
|
||||
}
|
||||
interface Encryptor {
|
||||
|
||||
Reference in New Issue
Block a user