new RiseSecret(secretopt)
Interface for secp256k1 key pair. If no secret is provided, one will be generated.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
secret | Uint8Array | | <optional> | Private key to use. |
Members
privateKey :Uint8Array
Underlying private key.
Type:
- Uint8Array
publicKey :Uint8Array
Public key derived from private key.
Type:
- Uint8Array
Methods
decrypt(message) → {Uint8Array}
Decrypts the given data using the underlying private key.
Parameters:
Name | Type | Description |
---|---|---|
message | Uint8Array | | Encrypted blob. |
Returns:
- Type:
- Uint8Array
sign(message) → {string}
Creates a digital signature from the provided data.
Parameters:
Name | Type | Description |
---|---|---|
message | Uint8Array | | Binary blob to sign. |
Returns:
hexSignature
- Type:
- string