crypt.js
No description.

File Location

/goog/crypt/crypt.js


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 »

Directory crypt

File Reference