add32Bit
static
void
add32Bit
(
first
,
second
)
Adds two numerics as if they were 32-bit integers.
- Parameters:
-
first <int>
operand -
second <int>
operand
- Returns:
void
MD5
static
void
MD5
(
msg
)
Calculates the MD5 hash for the given message
- Parameters:
-
msg <string>
The message to calculate the hash of, typically a UTF-8 string
- Returns:
void
stringToByteArray
static
void
stringToByteArray
(
The
)
Converts a standard JavaScript string (utf16) to a Byte Array
- Parameters:
-
The <string>
utf16 encoded string to convert to a byte array
- Returns:
void
utf16ToUtf8
static
void
utf16ToUtf8
(
The
)
Converts a standard JavaScript string (utf16) to a UTF8 string
- Parameters:
-
The <string>
utf16 encoded string to convert to a utf8 array
- Returns:
void
utf8ToByteArray
static
void
utf8ToByteArray
(
The
)
Converts a utf8 encoded string to a byte array. It's important to use a
utf8 encoded string, because otherwise characters with individual bytes
greater than 255 will be silently dropped.
- Parameters:
-
The <string>
utf8 encoded string to convert to a byte array
- Returns:
void