\CryptoManana\Core\Interfaces\MessageEncryptionKeyPairInterface

Interface KeyPairInterface - Interface for public and private key pair capabilities.

Summary

Methods
Constants
setKeyPair()
getKeyPair()
setPrivateKey()
getPrivateKey()
setPublicKey()
getPublicKey()
checkIfThePrivateKeyIsSet()
checkIfThePublicKeyIsSet()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setKeyPair()

setKeyPair(\CryptoManana\DataStructures\KeyPair  $keyPair) 

Setter for the whole key pair as an array.

Parameters

\CryptoManana\DataStructures\KeyPair $keyPair

The private and public key pair as an object.

Throws

\Exception

Validation errors.

getKeyPair()

getKeyPair() : \CryptoManana\DataStructures\KeyPair

Getter for the whole key pair as an array.

Throws

\Exception

Validation errors.

Returns

\CryptoManana\DataStructures\KeyPair

The private and public key pair as an object.

setPrivateKey()

setPrivateKey(string  $privateKey) 

Setter for the private key string property.

Parameters

string $privateKey

The private key string.

Throws

\Exception

Validation errors.

getPrivateKey()

getPrivateKey() : string

Getter for the private key string property.

Returns

string —

The private key string.

setPublicKey()

setPublicKey(string  $publicKey) 

Setter for the public key string property.

Parameters

string $publicKey

The public key string.

Throws

\Exception

Validation errors.

getPublicKey()

getPublicKey() : string

Getter for the public key string property.

Returns

string —

The public key string.

checkIfThePrivateKeyIsSet()

checkIfThePrivateKeyIsSet() 

Checks if the private key is present.

Throws

\Exception

If there is no private key set.

checkIfThePublicKeyIsSet()

checkIfThePublicKeyIsSet() 

Checks if the public key is present.

Throws

\Exception

If there is no public key set.