https://cryptojs.gitbook.io/docs/ just said "CryptoJS supports AES-128, AES-192, and AES-256. It will pick the variant by the size of the key you pass in. If you use a passphrase, then it will generate a 256-bit key."
But what is default config like mode, padding, iv ? I notice there is a CipherOption for mode & padding
interface CipherHelper {
encrypt(message: WordArray | string, key: WordArray | string, cfg?: CipherOption): CipherParams;
decrypt(ciphertext: CipherParams | string, key: WordArray | string, cfg?: CipherOption): WordArray;
}
But I can't figure what the default value, e.g. it does not look like ECB mode by default.
My second question is how does it decide to use ace-128, aes-192, ase-256 based on the key I input, e.g. if I use a short string key like "my password" will it decide to use ace-128 then ? How ?
--- update ---
Except for the answer, I find cryptojs: How to generate AES passphrase is also helpful to understand the passphrase used in CryptoJS.