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

Lines Matching refs:ciphertext

189   var ciphertext = new Array(blockCount);  // ciphertext as array of strings
208 // ct is now ciphertext for this block
210 ciphertext[b] = escCtrlChars(ct); // escape troublesome characters in ciphertext
213 // convert the nonce to a string to go on the front of the ciphertext
219 return ctrTxt + '-' + ciphertext.join('-');
224 * Use AES to decrypt 'ciphertext' with 'password' using 'nBits' key, in Counter mode of operation
230 function AESDecryptCtr(ciphertext, password, nBits) {
242 ciphertext = ciphertext.split('-'); // split ciphertext into array of block-length strings
244 // recover nonce from 1st element of ciphertext
247 var ctrTxt = unescCtrlChars(ciphertext[0]);
250 var plaintext = new Array(ciphertext.length-1);
252 for (var b=1; b<ciphertext.length; b++) {
259 ciphertext[b] = unescCtrlChars(ciphertext[b]);
262 for (var i=0; i<ciphertext[b].length; i++) {
264 var ciphertextByte = ciphertext[b].charCodeAt(i);
278 function escCtrlChars(str) { // escape control chars which might cause problems handling ciphertext
421 var cipherText = AESEncryptCtr(plainText, password, 256);
422 var decryptedText = AESDecryptCtr(cipherText, password, 256);