PHP Classes

File: src/Interfaces/KemInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   HPKE PHP   src/Interfaces/KemInterface.php   Download  
File: src/Interfaces/KemInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HPKE PHP
Encrypt and decrypt data using hybrid public keys
Author: By
Last change:
Date: 8 days ago
Size: 860 bytes
 

Contents

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

interface
KemInterface
{
    public function
generateKeys(): array;

    public function
getHeaderLength(): int;

    public function
getKemId(): string;

    public function
getPublicKeyLength(): int;

    public function
getSecretLength(): int;

    public function
getSecretKeyLength(): int;

    public function
encapsulate(
       
EncapsKeyInterface $encapsKey
   
): array;

    public function
decapsulate(
       
DecapsKeyInterface $decapsKey,
       
string $enc
   
): SymmetricKeyInterface;

    public function
authEncaps(
       
EncapsKeyInterface $encapsKey,
       
DecapsKeyInterface $decapsKey
   
): array;

    public function
authDecaps(
       
DecapsKeyInterface $decapsKey,
       
EncapsKeyInterface $encapsKey,
       
string $enc
   
): SymmetricKeyInterface;
}