function decrypt_content(password, iv_b64, ciphertext_b64, padding_char) {   
    var key = CryptoJS.MD5(password),
        iv = CryptoJS.enc.Base64.parse(iv_b64),
        ciphertext = CryptoJS.enc.Base64.parse(ciphertext_b64),
        bundle = {
            key: key,
            iv: iv,
            ciphertext: ciphertext
        };
    var plaintext = CryptoJS.AES.decrypt(bundle, key, {
        iv: iv,
        padding: CryptoJS.pad.NoPadding
    });
    try {
        return strip_padding(plaintext.toString(CryptoJS.enc.Utf8), padding_char);
    } catch (err) {
        // encoding failed; wrong password
        return false;
    }
}
/* Decrypts the content from the ciphertext bundle. */
Decrypts the content from the ciphertext bundle.
Decrypts the content from the ciphertext bundle .
function decrypt_content(password, iv_b64, ciphertext_b64, padding_char) {   
    var key = CryptoJS.MD5(password),
        iv = CryptoJS.enc.Base64.parse(iv_b64),
        ciphertext = CryptoJS.enc.Base64.parse(ciphertext_b64),
        bundle = {
            key: key,
            iv: iv,
            ciphertext: ciphertext
        };
    var plaintext = CryptoJS.AES.decrypt(bundle, key, {
        iv: iv,
        padding: CryptoJS.pad.NoPadding
    });
    try {
        return strip_padding(plaintext.toString(CryptoJS.enc.Utf8), padding_char);
    } catch (err) {
        return false;
    }
}
function decrypt_content ( password , iv_b64 , ciphertext_b64 , padding_char ) { var key = CryptoJS . MD5 ( password ) , iv = CryptoJS . enc . Base64 . parse ( iv_b64 ) , ciphertext = CryptoJS . enc . Base64 . parse ( ciphertext_b64 ) , bundle = { key : key , iv : iv , ciphertext : ciphertext } ; var plaintext = CryptoJS . AES . decrypt ( bundle , key , { iv : iv , padding : CryptoJS . pad . NoPadding } ) ; try { return strip_padding ( plaintext . toString ( CryptoJS . enc . Utf8 ) , padding_char ) ; } catch ( err ) { return false ; } }
Decrypts the content from the ciphertext bundle.
Decrypts the content from the ciphertext bundle .
// encoding failed; wrong password