PHP Classes

File: src/Operations/PKEInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PASERK PHP   src/Operations/PKEInterface.php   Download  
File: src/Operations/PKEInterface.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: 1 year ago
Size: 944 bytes
 

Contents

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

use
ParagonIE\Paserk\Operations\Key\{
   
SealingPublicKey,
   
SealingSecretKey
};
use
ParagonIE\Paseto\Keys\SymmetricKey;
use
ParagonIE\Paseto\ProtocolInterface;

/**
 * Class PKEInterface
 * @package ParagonIE\Paserk\Operations
 */
interface PKEInterface
{
   
/**
     * @return string
     */
   
public static function header(): string;

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

   
/**
     * @param SymmetricKey $ptk
     * @param SealingPublicKey $pk
     * @return string
     */
   
public function seal(SymmetricKey $ptk, SealingPublicKey $pk): string;

   
/**
     * @param string $header
     * @param string $encoded
     * @param SealingSecretKey $sk
     * @return SymmetricKey
     */
   
public function unseal(string $header, string $encoded, SealingSecretKey $sk): SymmetricKey;
}