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