Lines Matching refs:plaintext
453 var plaintext = encode_utf8(ptext);
458 for (i = 0; i < plaintext.length; i++) {
459 md5_update(plaintext.charCodeAt(i));
469 i = plaintext.length;
488 var ct = rijndaelEncrypt(header + plaintext, key, "CBC");
509 var i,plaintext="";
513 plaintext+=String.fromCharCode(result[i]);
527 return(decode_utf8(plaintext));
899 function formatPlaintext(plaintext) { argument
904 if ((!((typeof plaintext == "object") &&
905 ((typeof (plaintext[0])) == "number"))) &&
906 ((typeof plaintext == "string") || plaintext.indexOf)) {
907 plaintext = plaintext.split("");
909 for (i=0; i<plaintext.length; i++) {
910 plaintext[i] = plaintext[i].charCodeAt(0) & 0xFF;
914 i = plaintext.length % bpb;
916 plaintext = plaintext.concat(getRandomBytes(bpb - i));
919 return plaintext;
945 function rijndaelEncrypt(plaintext, key, mode) { argument
950 if (!plaintext || !key) { return; }
961 plaintext = formatPlaintext(plaintext);
965 for (var block = 0; block < plaintext.length / bpb; block++) {
966 aBlock = plaintext.slice(block * bpb, (block + 1) * bpb);