Methods
isEqual(other)
Returns true if this Bytes object is equal to the provided one.
Parameters:
| Name | Type | Description |
|---|---|---|
other |
The |
Returns:
| Type | Description |
|---|---|
|
true if this |
toBase64()
Returns the underlying bytes as a Base64-encoded string.
Returns:
| Type | Description |
|---|---|
|
The Base64-encoded string created from the |
toString()
Returns a string representation of the Bytes object.
Returns:
| Type | Description |
|---|---|
|
A string representation of the |
toUint8Array()
Returns the underlying bytes in a new Uint8Array.
Returns:
| Type | Description |
|---|---|
|
The Uint8Array created from the |
(static) fromBase64String(base64, subtype)
Creates a new Bytes object from the given Base64 string, converting it to
bytes.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
base64 |
The Base64 string used to create the |
||
subtype |
0 |
Optional subtype value. |
(static) fromUint8Array(array, subtype)
Creates a new Bytes object from the given Uint8Array.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
array |
The Uint8Array used to create the |
||
subtype |
0 |
Optional subtype value. |