PHP Classes

File: src/Operations/WrapInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PASERK PHP   src/Operations/WrapInterface.php   Download  
File: src/Operations/WrapInterface.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: 817 bytes
 

Contents

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

use
ParagonIE\Paseto\{
   
KeyInterface,
   
ProtocolInterface
};

/**
 * Interface WrapInterface
 * @package ParagonIE\Paserk\Operations
 */
interface WrapInterface
{
   
/**
     * Returns a custom ID ([A-Za-z0-9\-]+) for the encryption format.
     *
     * @return string
     */
   
public static function customId(): string;

   
/**
     * @return ProtocolInterface
     */
   
public function getProtocol(): ProtocolInterface;

   
/**
     * @param string $header
     * @param KeyInterface $key
     * @return string
     */
   
public function wrapKey(string $header, KeyInterface $key): string;

   
/**
     * @param string $wrapped
     * @return KeyInterface
     */
   
public function unwrapKey(string $wrapped): KeyInterface;
}