PHP Classes

File: src/Interfaces/AEADInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   HPKE PHP   src/Interfaces/AEADInterface.php   Download  
File: src/Interfaces/AEADInterface.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: 696 bytes
 

Contents

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

use
ParagonIE\HPKE\SymmetricKey;

interface
AEADInterface
{
    public function
getAeadId(): string;
    public function
keyLength(): int;
    public function
nonceLength(): int;
    public function
tagLength(): int;

    public function
encrypt(
       
#[\SensitiveParameter]
       
SymmetricKey $key,
       
#[\SensitiveParameter]
       
string $plaintext,
       
string $nonce,
       
string $aad = ''
   
): array;

    public function
decrypt(
       
#[\SensitiveParameter]
       
SymmetricKey $key,
       
string $ciphertext,
       
string $tag,
       
string $nonce,
       
string $aad = ''
   
): string;
}