Members
Methods
# delete()
Delete the underlying WASM instance.
Should be called before dereferencing this object to prevent the
WASM heap from growing indefinitely.
# load(encoded)
Load a Modulus from a base64 string
Parameters:
Name | Type | Description |
---|---|---|
encoded |
string
|
Base64 encoded string |
# loadArray(array)
Load a Modulus from an Uint8Array holding binary data
Parameters:
Name | Type | Description |
---|---|---|
array |
Uint8Array
|
TypedArray containing binary data |
# save(compressionopt) → {string}
Save the Modulus as a base64 string
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
compression |
ComprModeType
|
<optional> |
ComprModeType.zstd | The compression mode to use |
Base64 encoded string
string
# saveArray(compressionopt) → {Uint8Array}
Save the Modulus as a binary Uint8Array
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
compression |
ComprModeType
|
<optional> |
ComprModeType.zstd | The compression mode to use |
A byte array containing the Modulus in binary form
Uint8Array
# setValue(value)
Loads a Modulus from a string representing an uint64 value.
Parameters:
Name | Type | Description |
---|---|---|
value |
BigInt
|
BigInt value to set |