rise~ RiseSecret

new RiseSecret(secretopt)

Interface for secp256k1 key pair. If no secret is provided, one will be generated.

Parameters:
NameTypeAttributesDescription
secretUint8Array | buffer<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:
NameTypeDescription
messageUint8Array | buffer

Encrypted blob.

Returns:
Type: 
Uint8Array

sign(message) → {string}

Creates a digital signature from the provided data.

Parameters:
NameTypeDescription
messageUint8Array | buffer

Binary blob to sign.

Returns:

hexSignature

Type: 
string