PHP Classes

File: src/Operations/Key/SealingPublicKey.php

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

Contents

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

use
ParagonIE\Paserk\PaserkException;
use
ParagonIE\Paseto\Keys\AsymmetricPublicKey;
use
Exception;

/**
 * Class SealingPublicKey
 * @package ParagonIE\Paserk\Operations\Key
 */
class SealingPublicKey extends AsymmetricPublicKey
{
   
/**
     * @return AsymmetricPublicKey
     *
     * @throws PaserkException
     * @throws Exception
     */
   
public function toPasetoKey(): AsymmetricPublicKey
   
{
        return new
AsymmetricPublicKey(
           
$this->key,
           
$this->protocol
       
);
    }
}