Lines Matching refs:plaintext
400 function formatPlaintext(plaintext) { argument
405 if ((!((typeof plaintext == "object") &&
406 ((typeof (plaintext[0])) == "number"))) &&
407 ((typeof plaintext == "string") || plaintext.indexOf)) {
408 plaintext = plaintext.split("");
410 for (i=0; i<plaintext.length; i++) {
411 plaintext[i] = plaintext[i].charCodeAt(0) & 0xFF;
415 i = plaintext.length % bpb;
417 plaintext = plaintext.concat(getRandomBytes(bpb - i));
420 return plaintext;
446 function rijndaelEncrypt(plaintext, key, mode) { argument
451 if (!plaintext || !key) { return; }
462 plaintext = formatPlaintext(plaintext);
466 for (var block = 0; block < plaintext.length / bpb; block++) {
467 aBlock = plaintext.slice(block * bpb, (block + 1) * bpb);