Lines Matching defs:and
32 /* Set up the decrypt button and necessary functionality. */
50 // Create a hidden element with id 'wiki__text_submit' and
62 // Move the real wiki__text element out of the form (so it is not submitted and
149 // at once (user pushing 'Submit' and draft save running, or multiple draft
235 // encrypt text (set back to ctext, and forget key)
288 /* decrypt the text between <CRYPT> and </CRYPT> */
429 modified from Encrypt_Text to expect ascii key and take input params
430 and to return base64 encoded
455 // Compute MD5 sum of message text and add to header
601 // given in its parameter. It returns the resulting array and is used for
602 // the ShiftRow step. Note that shift() and push() could be used for a more
623 // Multiplies the two elements of GF(2^8) together and returns the result.
626 // to the result. x and y should be bytes representing elements of GF(2^8)
638 // state information (see spec) and direction is string indicating whether
672 for (i = 0; i < 4; i++) { // and for each row in the column...
695 state[0][j] ^= (roundKey[j] & 0xFF); // and XOR
770 // block, an array of bytes representing a plaintext block, and expandedKey,
787 // block, an array of bytes representing a ciphertext block, and expandedKey,
806 // This method takes a byte array (byteArray) and converts it to a string by
807 // applying String.fromCharCode() to each value and concatenating the result.
823 // This function takes an array of bytes (byteArray) and converts them
893 // and pads it with pseudorandom bytes if its length is not a multiple of the block
934 // Encrypts the plaintext using the given key and in the given mode.
960 // convert plaintext to byte array and pad with zeros if necessary.
979 // Decrypts the using the given key and mode. The parameter "ciphertext"
1028 /* Start by declaring static storage and initialise
1066 /* Add the current time and date (milliseconds since the epoch,
1079 var oldMoveHandler; // For saving and restoring mouse move handler in IE4
1090 // Internet Explorer 5 and above event model
1106 from the mouse and use that to determine how many subsequent
1140 and odd bytes respectively of the entropy vector, then
1201 /* Now make between one and four additional
1239 // Return integer between 0 and n inclusive
1254 For the rationale behind this (and why taking
1256 Ferguson and Schneier, "Practical Cryptography",
1275 Bays, C. and S. D. Durham. ACM Trans. Math. Software: 2 (1976)
1316 // Return next random integer between 0 and n inclusive
1330 For the rationale behind this (and why taking
1332 Ferguson and Schneier, "Practical Cryptography",
1417 function and(a, b) {
1510 return or(and(x, y), and(not(x), z));
1514 return or(and(x, z), and(y, not(z)));
1567 x[i] = and(buf[i * 4 + offset], 0xFF);
1569 x[i] += shl(and(buf[i * 4 + j + offset] ,0xFF), j * 8);
1666 index = and(shr(count[0],3) , 0x3F);
1674 buffer[index] = and(b, 0xff);
1686 bits[i] = and(shr(count[0], (i * 8)), 0xFF);
1689 bits[i + 4] = and(shr(count[1], (i * 8)), 0xFF);
1691 index = and(shr(count[0], 3), 0x3F);
1704 digestBits[i * 4 + j] = and(shr(state[i], (j * 8)) , 0xFF);
1721 of "?HX?" and suffixed by "?H", then broken into lines no
1746 string supplied contains a start and/or end sentinel,
1779 first group of a message is always "ZZZZZ" and the last "YYYYY";
1780 the decoding process ignores any text outside these start and
1783 a pseudorandomly generated base letter and wraps around modulo
1786 identical for all messages and adds no security. If the message
1857 other than letters are silently ignored; both lower and upper
1901 and assemble into bytes. */
1928 /* Ponder how we escaped from the decoder loop and
1959 of 64 consisting of the upper and lower case letters, decimal digits,
1960 and the special characters "+" and "/". If the input is not a multiple
1963 message with "?b64" and append "?64b" to the end; if one or both
2024 data stream and skip the type sentinel if present. */
2083 /* Encoding and decoding of Unicode character strings as