Sign
in package
Class Sign.
Table of Contents
- makeKeyPair() : string
- Makes a keypair.
- makePublicKey() : string
- Makes the public key from a keypair.
- makeSecretKey() : string
- Makes the secret key from a keypair.
- signature() : string
- Gets the digital signature (detached) from a message with a secret key.
- verify() : bool
- Verifies if a message has a valid signature.
Methods
makeKeyPair()
Makes a keypair.
public
static makeKeyPair() : string
Tags
Return values
string —makePublicKey()
Makes the public key from a keypair.
public
static makePublicKey(string $keyPair) : string
Parameters
- $keyPair : string
Tags
Return values
string —makeSecretKey()
Makes the secret key from a keypair.
public
static makeSecretKey(string $keyPair) : string
Parameters
- $keyPair : string
Tags
Return values
string —signature()
Gets the digital signature (detached) from a message with a secret key.
public
static signature(string $message, string $secretKey) : string
Parameters
- $message : string
- $secretKey : string
Tags
Return values
string —verify()
Verifies if a message has a valid signature.
public
static verify(string $message, string $signature, string $publicKey) : bool
Parameters
- $message : string
- $signature : string
- $publicKey : string