Home | History | Annotate | Download | only in sunspider-0.9

Lines Matching refs:plaintext

158  * Use AES to encrypt 'plaintext' with 'password' using 'nBits' key, in 'Counter' mode of operation
162 * - cipherblock = plaintext xor outputblock
164 function AESEncryptCtr(plaintext, password, nBits) {
188 var blockCount = Math.ceil(plaintext.length/blockSize);
200 var blockLength = b<blockCount-1 ? blockSize : (plaintext.length-1)%blockSize+1;
203 for (var i=0; i<blockLength; i++) { // -- xor plaintext with ciphered counter byte-by-byte --
204 var plaintextByte = plaintext.charCodeAt(b*blockSize+i);
228 * - cipherblock = plaintext xor outputblock
250 var plaintext = new Array(ciphertext.length-1);
263 // -- xor plaintext with ciphered counter byte-by-byte --
268 // pt is now plaintext for this block
270 plaintext[b-1] = pt; // b-1 'cos no initial nonce block in plaintext
273 return plaintext.join('');
385 var plainText = "ROMEO: But, soft! what light through yonder window breaks?\n\
421 var cipherText = AESEncryptCtr(plainText, password, 256);