Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToKey ¶
From https://github.com/walkert/go-evp . BytesToKey implements the Openssl EVP_BytesToKey logic. It takes the salt, data, a hash type and the key/block length used by that type. As such it differs considerably from the openssl method in C.
func DecryptCryptoJsAesMsg ¶
Decrypt a CryptoJS.AES.encrypt(msg, password) encrypted msg. ciphertext is the result of CryptoJS.AES.encrypt(), which is the base64 string of "Salted__" + [8 bytes random salt] + [actual ciphertext]. actual ciphertext is padded (make it's length align with block length) using Pkcs7. CryptoJS use an OpenSSL-compatible EVP_BytesToKey to derive (key,iv) from (password,salt), using md5 as hash type and 32 / 16 as length of key / block. See: https://stackoverflow.com/questions/35472396/how-does-cryptojs-get-an-iv-when-none-is-specified , https://stackoverflow.com/questions/64797987/what-is-the-default-aes-config-in-crypto-js .
Types ¶
This section is empty.