Hash256⚓︎
- Hash256
- Represents a 256-bit hash.
Extends⚓︎
Constructors⚓︎
new Hash256()⚓︎
Creates a hash from bytes or a hex string.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
hash256 |
string | Uint8Array<ArrayBufferLike> |
Input string or byte array. |
Returns⚓︎
Hash256
Overrides⚓︎
Properties⚓︎
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
bytes |
public |
Uint8Array<ArrayBuffer> |
Underlying bytes. | ByteArray.bytes |
NAME |
static |
string |
Byte array name (required because constructor.name is dropped during minification). |
ByteArray.NAME |
SIZE |
static |
number |
Byte size of raw hash. | - |
Methods⚓︎
toJson()⚓︎
- Hash256.toJson
- Returns representation of this object that can be stored in JSON.
Returns⚓︎
string
JSON-safe representation of this object.
Inherited from⚓︎
toString()⚓︎
- Hash256.toString
- Returns string representation of this object.
Returns⚓︎
string
String representation of this object
Inherited from⚓︎
zero()⚓︎
- Hash256.zero
- Creates a zeroed hash.
Returns⚓︎
Hash256
Zeroed hash.