final class TotpCodeGenerator (View source)

internal  
 

Computes RFC 6238 codes from already validated secret bytes and a counter time-step.

Methods

string
generate(TotpSecret $secret, int $timestamp, TotpConfiguration $configuration)

Produces one fixed-width OTP for a non-negative Unix timestamp.

string

Details

generate

string generate(TotpSecret $secret, int $timestamp, TotpConfiguration $configuration)

Produces one fixed-width OTP for a non-negative Unix timestamp.

Parameters

TotpSecret $secret
int $timestamp
TotpConfiguration $configuration

Return Value

string