\CryptoManana\Core\Interfaces\ContainersTokenTransformationInterface

Interface TokenTransformationInterface - Interface specification for authentication token transformation.

Summary

Methods
Constants
generateAuthenticationToken()
extractAuthenticationToken()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

generateAuthenticationToken()

generateAuthenticationToken(integer  $length = 64) : \CryptoManana\DataStructures\AuthenticationToken

Generate a secure token and create an encrypt representation.

Parameters

integer $length

The desired output string length in bytes (default => 64).

Throws

\Exception

Validation errors.

Returns

\CryptoManana\DataStructures\AuthenticationToken

The authentication token data structure object.

extractAuthenticationToken()

extractAuthenticationToken(string  $cipherToken) : string

Extracts the token from the cipher data via a predefined configuration.

Parameters

string $cipherToken

The encrypted token string.

Throws

\Exception

Validation errors.

Returns

string —

The decrypted authentication token.