Lines Matching refs:plaintext
381 var plaintext = encode_utf8(ptext);
386 for (i = 0; i < plaintext.length; i++) {
387 md5_update(plaintext.charCodeAt(i));
397 i = plaintext.length;
416 var ct = rijndaelEncrypt(header + plaintext, key, "CBC");
437 var i,plaintext="";
441 plaintext+=String.fromCharCode(result[i]);
455 return(decode_utf8(plaintext));
827 function formatPlaintext(plaintext) { argument
832 if ((!((typeof plaintext == "object") &&
833 ((typeof (plaintext[0])) == "number"))) &&
834 ((typeof plaintext == "string") || plaintext.indexOf)) {
835 plaintext = plaintext.split("");
837 for (i=0; i<plaintext.length; i++) {
838 plaintext[i] = plaintext[i].charCodeAt(0) & 0xFF;
842 i = plaintext.length % bpb;
844 plaintext = plaintext.concat(getRandomBytes(bpb - i));
847 return plaintext;
873 function rijndaelEncrypt(plaintext, key, mode) { argument
878 if (!plaintext || !key) { return; }
889 plaintext = formatPlaintext(plaintext);
893 for (var block = 0; block < plaintext.length / bpb; block++) {
894 aBlock = plaintext.slice(block * bpb, (block + 1) * bpb);