Monday, February 6, 2017

Encryption in Javascript

<script src="Scripts/tripledes.js"></script>
<script src="Scripts/mode-ecb.js"></script>

function encrypt() {
    var keyHex = CryptoJS.enc.Utf8.parse("mkadm11n");

    var crypted = CryptoJS.DES.encrypt("Message", keyHex, {
        mode: CryptoJS.mode.ECB,
        padding: CryptoJS.pad.Pkcs7
    });
}

No comments:

Post a Comment