Aplus Framework Docs

BoxTrait

Trait BoxTrait.

Table of Contents

makeKeyPair()  : string
Makes a keypair.
makeNonce()  : string
Makes a box nonce with the correct length.
makePublicKey()  : string
Makes the public key from a keypair.
makeSecretKey()  : string
Makes the secret key from a keypair.

Methods

makeKeyPair()

Makes a keypair.

public static makeKeyPair() : string
Tags
throws
SodiumException
Return values
string

makeNonce()

Makes a box nonce with the correct length.

public static makeNonce() : string
Tags
throws
Exception

if fail to get random bytes

Return values
string

makePublicKey()

Makes the public key from a keypair.

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

Search results