tce_functions_otp.php

Functions for One Time Password (OTP).

Source: shared/code/tce_functions_otp.php

Functions for One Time Password (OTP).

Functions

F_decodeBase32()

Decode a Base32 encoded string.

function F_decodeBase32(mixed $code): Decoded

Parameters:

  • $code (mixed): (string) Base32 code to be decoded.

Returns: Decoded: key.

Source: shared/code/tce_functions_otp.php:45

F_getOTP()

Get a One Time Password for the specified secret key.

function F_getOTP(mixed $otpkey, mixed $mtime = 0): OTP

Parameters:

  • $otpkey (mixed): (string) One Time Password secret key.
  • $mtime (mixed): (int) Reference time in microseconds.

Returns: OTP

Source: shared/code/tce_functions_otp.php:75

F_getRandomOTPkey()

Return a random One Time Password Secret Key (Base32 encoded).

function F_getRandomOTPkey(): Base32

Returns: Base32: encoded key.

Source: shared/code/tce_functions_otp.php:27