PHP Classes

File: src/IdInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PASERK PHP   src/IdInterface.php   Download  
File: src/IdInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PASERK PHP
Extend PASETO to wrap and serialize keys
Author: By
Last change:
Date: 2 years ago
Size: 581 bytes
 

Contents

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

use
ParagonIE\Paseto\ProtocolInterface;

/**
 * Interface IdInterface
 * @package ParagonIE\Paserk
 */
interface IdInterface
{
   
/**
     * Get the PASERK type label for this ID
     *
     * @return string
     */
   
public static function getTypeLabel(): string;

   
/**
     * Calculate the Key-ID for a given PASERK.
     *
     * @param ProtocolInterface $version
     * @param string $paserk
     * @return string
     */
   
public static function encode(ProtocolInterface $version, string $paserk): string;
}