crypt

Classes

goog.crypt.Aes
Implementation of AES in JavaScript. See http://en.wikipedia.org/wiki/Advanced_Encryption_Standard WARNING: This is ECB mode only. If you are encrypting something longer than 16 bytes, or encrypting more than one value with the same key (so basically, always) you need to use this with a block cipher mode of operation. See goog.crypt.Cbc. See http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation for more information.
goog.crypt.Arc4
ARC4 streamcipher implementation.
goog.crypt.BlobHasher
Construct the hash computer.
goog.crypt.BlockCipher
Interface definition for a block cipher.
goog.crypt.Hash
Create a cryptographic hash instance.
goog.crypt.Hmac
No description.
goog.crypt.JpegEncoder
Initializes the JpegEncoder.
goog.crypt.Md5
MD5 cryptographic hash constructor.
goog.crypt.Sha1
SHA-1 cryptographic hash constructor. The properties declared here are discussed in the above algorithm document.
goog.crypt.Sha2
SHA-2 cryptographic hash constructor. This constructor should not be used directly to create the object. Rather, one should use the constructor of the sub-classes.
goog.crypt.Sha224
SHA-224 cryptographic hash constructor.
goog.crypt.Sha256
SHA-256 cryptographic hash constructor.
goog.crypt.Sha2_64bit
Constructs a SHA-2 64-bit cryptographic hash. This class should not be used. Rather, one should use one of its subclasses.
goog.crypt.Sha384
Constructs a SHA-384 cryptographic hash.
goog.crypt.Sha512
Constructs a SHA-512 cryptographic hash.
goog.crypt.Sha512_256
Constructs a SHA-512/256 cryptographic hash.

Public Protected Private

Global Functions

goog.crypt.byteArrayToHex(array) string
Turns an array of numbers into the hex string given by the concatenation of the hex values to which the numbers correspond.
Arguments:
array : Uint8Array | Int8Array | Array.<number>
Array of numbers representing characters.
Returns: string  Hex string.
code »
goog.crypt.byteArrayToString(bytes) string
Turns an array of numbers into the string given by the concatenation of the characters to which the numbers correspond.
Arguments:
bytes : Array
Array of numbers representing characters.
Returns: string  Stringification of the array.
code »
goog.crypt.hexToByteArray(hexString) !Array.<number>
Converts a hex string into an integer array.
Arguments:
hexString : string
Hex string of 16-bit integers (two characters per integer).
Returns: !Array.<number>  Array of {0,255} integers for the given string.
code »
goog.crypt.stringToByteArray(str) !Array.<number>
Turns a string into an array of bytes; a "byte" being a JS number in the range 0-255.
Arguments:
str : string
String value to arrify.
Returns: !Array.<number>  Array of numbers corresponding to the UCS character codes of each character in str.
code »
goog.crypt.stringToUtf8ByteArray(str) !Array.<number>
Converts a JS string to a UTF-8 "byte" array.
Arguments:
str : string
16-bit unicode string.
Returns: !Array.<number>  UTF-8 byte array.
code »
goog.crypt.utf8ByteArrayToString(bytes) string
Converts a UTF-8 byte array to JavaScript's 16-bit Unicode.
Arguments:
bytes : Uint8Array | Int8Array | Array.<number>
UTF-8 byte array.
Returns: string  16-bit Unicode string.
code »
goog.crypt.xorByteArray(bytes1bytes2) !Array.<number>
XOR two byte arrays.
Arguments:
bytes1 : !ArrayBufferView | !Array.<number>
Byte array 1.
bytes2 : !ArrayBufferView | !Array.<number>
Byte array 2.
Returns: !Array.<number>  Resulting XOR of the two byte arrays.
code »

Global Properties

goog.crypt.AesTest :
No description.
Code »
goog.crypt.Arc4Test :
No description.
Code »
goog.crypt.BlobHasherTest :
No description.
Code »
goog.crypt.CbcTest :
No description.
Code »
goog.crypt.HmacTest :
No description.
Code »
goog.crypt.Md5Test :
No description.
Code »
goog.crypt.Sha1Test :
No description.
Code »
goog.crypt.Sha224Test :
No description.
Code »
goog.crypt.Sha256Test :
No description.
Code »
goog.crypt.Sha2_64bit_test :
No description.
Code »
goog.crypt.base64 :
No description.
Code »
goog.crypt.base64Test :
No description.
Code »
goog.crypt.baseN :
No description.
Code »
goog.crypt.baseNTest :
No description.
Code »
goog.crypt.byteArrayToStringPerf :
No description.
Code »
goog.crypt.hash32 :
No description.
Code »
goog.crypt.hash32Test :
No description.
Code »
goog.crypt.hashTester :
No description.
Code »
goog.crypt.pbkdf2 :
No description.
Code »
goog.crypt.pbkdf2Test :
No description.
Code »

Package crypt

Package Reference