Methods
(static) array(message) → {Array}
Output hash as bytes array
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Array | Uint8Array | ArrayBuffer | message to hash |
Returns:
Bytes array
- Type
- Array
Example
md4.array('The quick brown fox jumps over the lazy dog');
(static) buffer(message) → {ArrayBuffer}
Output hash as ArrayBuffer
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Array | Uint8Array | ArrayBuffer | message to hash |
Returns:
ArrayBuffer
- Type
- ArrayBuffer
Example
md4.buffer('The quick brown fox jumps over the lazy dog');
(static) create() → {Md4}
Create Md4 object
Returns:
MD4 object.
- Type
- Md4
Example
var hash = md4.create();
(static) digest(message) → {Array}
Output hash as bytes array
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Array | Uint8Array | ArrayBuffer | message to hash |
Returns:
Bytes array
- Type
- Array
Example
md4.digest('The quick brown fox jumps over the lazy dog');
(static) hex(message) → {String}
Output hash as hex string
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Array | Uint8Array | ArrayBuffer | message to hash |
Returns:
Hex string
- Type
- String
Example
md4.hex('The quick brown fox jumps over the lazy dog');
// equal to
md4('The quick brown fox jumps over the lazy dog');
(static) update(message) → {Md4}
Create and update Md4 object
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Array | Uint8Array | ArrayBuffer | message to hash |
Returns:
MD4 object.
- Type
- Md4
Example
var hash = md4.update('The quick brown fox jumps over the lazy dog');
// equal to
var hash = md4.create();
hash.update('The quick brown fox jumps over the lazy dog');