Methods
(private) _arrToHex(arr) → {String}
Converts byte array to hex string representation.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | array to be converted |
- Source:
Returns:
- hex representation of array
- Type
- String
(private) _arrToHex(arr) → {String}
Converts byte array to hex string representation.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | array to be converted |
- Source:
Returns:
- hex representation of array
- Type
- String
digest(digestType, messageArray) → {String}
Calculates digest of the message provided as array of bytes.
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
messageArray |
Array | array of bytes to calculate digest of |
- Source:
Returns:
hexadecimal hash of the message
- Type
- String
digest(digestType, messageArray) → {String}
Calculates digest of the message provided as array of bytes.
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
messageArray |
Array | array of bytes to calculate digest of |
- Source:
Returns:
hexadecimal hash of the message
- Type
- String
digestUTF8(digestType, message) → {String}
Calculates digest of the message provided as String.
Internally message is converted into UTF8 array of bytes.
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
message |
String | message to calculate digest of |
- Source:
Returns:
hexadecimal hash of the message
- Type
- String
digestUTF8(digestType, message) → {String}
Calculates digest of the message provided as String.
Internally message is converted into UTF8 array of bytes.
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
message |
String | message to calculate digest of |
- Source:
Returns:
hexadecimal hash of the message
- Type
- String
getDigestLen(digestType) → {Number}
Gets length (in bytes) of digest result.
This value is constant for chosen digest type.
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
- Source:
Returns:
len of digest result
- Type
- Number
getDigestLen(digestType) → {Number}
Gets length (in bytes) of digest result.
This value is constant for chosen digest type.
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
- Source:
Returns:
len of digest result
- Type
- Number
isDigestSupported(digestType) → {Boolean}
Checks if digest is supported
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
- Source:
Returns:
digest support state
- Type
- Boolean
isDigestSupported(digestType) → {Boolean}
Checks if digest is supported
Parameters:
Name | Type | Description |
---|---|---|
digestType |
String | name of digest |
- Source:
Returns:
digest support state
- Type
- Boolean