Lines Matching defs:a

11 // This should be replaced with some way that a plugin can request
12 // onSubmit handlers for a given form element
44 // if there is no preview button, then assume this is a
50 // Create a hidden element with id 'wiki__text_submit' and
101 // Do not allow saving of a draft, if this page needs some content to be encrypted on save.
439 alert("Please specify a key with which to encrypt the message.");
602 // the ShiftRow step. Note that shift() and push() could be used for a more
625 // the indeterminant that has a 1 coefficient in x, add y times that power
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
824 // to a hexadecimal string. Array element 0 is found at the beginning of
826 // similarly, for example [16, 255] --> "10ff". The function returns a
839 // This function converts a string containing hexadecimal digits to an
859 // column 0, row 0 to 3). This function returns a 2d array.
877 // by Rijndael into a single 1d array of bytes. It assumes the input "packed"
878 // is a packed array. Bytes are filled in according to the Rijndael spec.
879 // This function returns a 1d array of bytes.
892 // This function takes a prospective plaintext (string or array of bytes)
893 // and pads it with pseudorandom bytes if its length is not a multiple of the block
894 // size. If plaintext is a string, it is converted to an array of bytes
935 // The parameter "plaintext" can either be a string or an array of bytes.
936 // The parameter "key" must be an array of key bytes. If you have a hex
938 // to an array of bytes. The third parameter "mode" is a string indicating
981 // bytes. If you have a hex string representing the ciphertext or key,
983 // parameter "mode" is a string, either "CBC" or "ECB".
986 // this array to a hex string, invoke byteArrayToHex() on it. To convert it
987 // to a string of characters, you can use byteArrayToString().
993 var aBlock; // a decrypted block
1038 // Add a byte to the entropy vector
1044 /* Capture entropy. When the user presses a key or performs
1046 notification, add the time in 255ths of a second to the
1055 // Add a 32 bit quantity to the entropy vector
1138 /* Compute a 32 byte key value from the entropy vector.
1270 L'Ecuyer's two-sequence generator with a Bays-Durham shuffle
1285 function uGen(old, a, q, r, m) {
1289 t = a * (old - (t * q)) - (t * r);
1373 /* Some basic logical functions had to be rewritten because of a bug in
1383 function shr(a, b) {
1384 a = integer(a);
1386 if (a - 0x80000000 >= 0) {
1387 a = a % 0x80000000;
1388 a >>= b;
1389 a += 0x40000000 >> (b - 1);
1391 a >>= b;
1393 return a;
1396 function shl1(a) {
1397 a = a % 0x80000000;
1398 if (a & 0x40000000 == 0x40000000) {
1399 a -= 0x40000000;
1400 a *= 2;
1401 a += 0x80000000;
1403 a *= 2;
1405 return a;
1408 function shl(a, b) {
1409 a = integer(a);
1412 a = shl1(a);
1414 return a;
1417 function and(a, b) {
1418 a = integer(a);
1420 var t1 = a - 0x80000000;
1430 return (a & t2);
1432 return (a & b);
1437 function or(a, b) {
1438 a = integer(a);
1440 var t1 = a - 0x80000000;
1450 return ((a | t2) + 0x80000000);
1452 return (a | b);
1457 function xor(a, b) {
1458 a = integer(a);
1460 var t1 = a - 0x80000000;
1470 return ((a ^ t2) + 0x80000000);
1472 return (a ^ b);
1477 function not(a) {
1478 a = integer(a);
1479 return 0xffffffff - a;
1525 function rotateLeft(a, n) {
1526 return or(shl(a, n), (shr(a, (32 - n))));
1529 function jcFF(a, b, c, d, x, s, ac) {
1530 a = a + jcF(b, c, d) + x + ac;
1531 a = rotateLeft(a, s);
1532 a = a + b;
1533 return a;
1536 function jcGG(a, b, c, d, x, s, ac) {
1537 a = a + jcG(b, c, d) + x + ac;
1538 a = rotateLeft(a, s);
1539 a = a + b;
1540 return a;
1543 function jcHH(a, b, c, d, x, s, ac) {
1544 a = a + jcH(b, c, d) + x + ac;
1545 a = rotateLeft(a, s);
1546 a = a + b;
1547 return a;
1550 function jcII(a, b, c, d, x, s, ac) {
1551 a = a + jcI(b, c, d) + x + ac;
1552 a = rotateLeft(a, s);
1553 a = a + b;
1554 return a;
1558 var a = 0, b = 0, c = 0, d = 0;
1561 a = state[0];
1574 a = jcFF( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
1575 d = jcFF( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
1576 c = jcFF( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
1577 b = jcFF( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
1578 a = jcFF( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
1579 d = jcFF( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
1580 c = jcFF( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
1581 b = jcFF( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
1582 a = jcFF( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
1583 d = jcFF( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
1584 c = jcFF( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
1585 b = jcFF( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
1586 a = jcFF( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
1587 d = jcFF( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
1588 c = jcFF( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
1589 b = jcFF( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
1592 a = jcGG( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
1593 d = jcGG( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
1594 c = jcGG( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
1595 b = jcGG( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
1596 a = jcGG( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
1597 d = jcGG( d, a, b, c, x[10], S22, 0x2441453); /* 22 */
1598 c = jcGG( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
1599 b = jcGG( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
1600 a = jcGG( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
1601 d = jcGG( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
1602 c = jcGG( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
1603 b = jcGG( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
1604 a = jcGG( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
1605 d = jcGG( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
1606 c = jcGG( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
1607 b = jcGG( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
1610 a = jcHH( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
1611 d = jcHH( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
1612 c = jcHH( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
1613 b = jcHH( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
1614 a = jcHH( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
1615 d = jcHH( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
1616 c = jcHH( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
1617 b = jcHH( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
1618 a = jcHH( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
1619 d = jcHH( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
1620 c = jcHH( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
1621 b = jcHH( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
1622 a = jcHH( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
1623 d = jcHH( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
1624 c = jcHH( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
1625 b = jcHH( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
1628 a = jcII( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
1629 d = jcII( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
1630 c = jcII( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
1631 b = jcII( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
1632 a = jcII( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
1633 d = jcII( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
1634 c = jcII( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
1635 b = jcII( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
1636 a = jcII( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
1637 d = jcII( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
1638 c = jcII( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
1639 b = jcII( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
1640 a = jcII( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
1641 d = jcII( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
1642 c = jcII( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
1643 b = jcII( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
1645 state[0] += a;
1720 bytes as a hexadecimal string which is prefixed by a sentinel
1725 a message. The hexadecimal to byte array interconversion
1746 string supplied contains a start and/or end sentinel,
1777 Codegroup armour encodes a byte string into a sequence of five
1779 first group of a message is always "ZZZZZ" and the last "YYYYY";
1783 a pseudorandomly generated base letter and wraps around modulo
1807 /* Add a letter to the current codegroup, emitting it when
1871 // Decode a message in codegroup armour
1957 Base64 armour encodes a byte array as described in RFC 1341. Sequences
1958 of three bytes are encoded into groups of four characters from a set
1960 and the special characters "+" and "/". If the input is not a multiple
2139 a character of 0x9D (Unicode OPERATING
2140 SYSTEM COMMAND) or a character greater
2150 know what somebody is going to paste into a
2169 /* DECODE_UTF8 -- Decode a string encoded with encode_utf8
2173 balance as a UTF-8 stream. Otherwise,
2189 // navigator clipboard api needs a secure context (https)