PHP Classes

File: src/OTP/OTPInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PHP Multi Factor Authentication   src/OTP/OTPInterface.php   Download  
File: src/OTP/OTPInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Multi Factor Authentication
2 factor authentication independent of the vendor
Author: By
Last change:
Date: 4 years ago
Size: 603 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);
namespace
ParagonIE\MultiFactor\OTP;

use
ParagonIE\HiddenString\HiddenString;

/**
 * Interface OTPInterface
 * @package ParagonIE\MultiFactor\OTP
 */
interface OTPInterface
{
   
/**
     * Get the code we need
     *
     * @param string|HiddenString $sharedSecret The key to use for determining the TOTP
     * @param int $counterValue Current time or HOTP counter
     * @return string
     * @throws \OutOfRangeException
     */
   
public function getCode(
       
$sharedSecret,
       
int $counterValue
   
): string;

    public function
getLength(): int;
}