Aplus Framework Docs

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
throws
SodiumException
Return values
string

makePublicKey()

Makes the public key from a keypair.

public static makePublicKey(string $keyPair) : string
Parameters
$keyPair : string
Tags
see
Sign::makeKeyPair()
throws
SodiumException
Return values
string

makeSecretKey()

Makes the secret key from a keypair.

public static makeSecretKey(string $keyPair) : string
Parameters
$keyPair : string
Tags
see
Sign::makeKeyPair()
throws
SodiumException
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
see
Sign::makeSecretKey()
throws
SodiumException
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
Tags
see
Sign::makePublicKey()
see
Sign::signature()
throws
SodiumException
Return values
bool

Search results