ed25519

Created by

cs

KeyPairObj

  • publicKey : Uint8Array with 32-byte public key Public Key
  • secretKey : Uint8Array with 64-byte secret key Private Key

keyPair

Get private key pair

  • return
    • keyPair : KeyPairObj Private Key Pair

getPublicKey

Get public key via private key (This private key has to be derived from keyPair)

  • params
    • privKey : Buffer Public Key
  • return
    • publicKey : Uint8Array with 32-byte public key Private Key

sign

  • params
    • message : string
    • privKey : buffer Private Key
  • return
    • signature : Hex String

verify

  • params
    • message : string
    • signature : Hex String
    • publicKey : Buffer
  • return
    • target : Boolean Result

random

Generating random number

  • params
    • bytesLen : number, default: 32
  • return
    • num : Uint8Array Random Number