\CryptoManana\Core\Interfaces\ContainersAsymmetricKeyPairGenerationInterface

Interface AsymmetricKeyPairGenerationInterface - Interface for asymmetric key pair generation.

Summary

Methods
Constants
getAsymmetricKeyPair()
RSA_KEY_PAIR_TYPE
DSA_KEY_PAIR_TYPE
KEY_PAIR_1024_BITS
KEY_PAIR_2048_BITS
KEY_PAIR_3072_BITS
KEY_PAIR_4096_BITS
No protected methods found
N/A
No private methods found
N/A

Constants

RSA_KEY_PAIR_TYPE

RSA_KEY_PAIR_TYPE

The RSA key pair type.

DSA_KEY_PAIR_TYPE

DSA_KEY_PAIR_TYPE

The DSA/DSS key pair type.

KEY_PAIR_1024_BITS

KEY_PAIR_1024_BITS

The asymmetric key pair 1024-bit size.

KEY_PAIR_2048_BITS

KEY_PAIR_2048_BITS

The asymmetric key pair 2048-bit size.

KEY_PAIR_3072_BITS

KEY_PAIR_3072_BITS

The asymmetric key pair 3072-bit size.

KEY_PAIR_4096_BITS

KEY_PAIR_4096_BITS

The asymmetric key pair 4096-bit size.

Methods

getAsymmetricKeyPair()

getAsymmetricKeyPair(integer  $keySize = self::KEY_PAIR_4096_BITS, integer  $algorithmType = self::RSA_KEY_PAIR_TYPE) : \CryptoManana\DataStructures\KeyPair

Generate a random key pair for asymmetrical cyphers.

Parameters

integer $keySize

The key size in bits.

integer $algorithmType

The asymmetric algorithm type integer code.

Throws

\Exception

Validation errors.

Returns

\CryptoManana\DataStructures\KeyPair

Randomly generated asymmetric key pair (private and public keys) as an object.