CoreFiles by mySites.guru
AbstractECDHAESKW.php32 lines, 761 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
f2a7ec2284d220ecb0420347beac7a90
sha1
94d1afcdbecc72eb69533768a4063f792291249c
sha256
d0c5dcc950d0c1a4e336add031a7ff7f32e059420db4f142d04729449b2374d2
<?php

declare(strict_types=1);

namespace Jose\Component\Encryption\Algorithm\KeyEncryption;

use AESKW\Wrapper as WrapperInterface;
use RuntimeException;

abstract class AbstractECDHAESKW implements KeyAgreementWithKeyWrapping
{
    public function __construct()
    {
        if (! interface_exists(WrapperInterface::class)) {
            throw new RuntimeException('Please install "spomky-labs/aes-key-wrap" to use AES-KW algorithms');
        }
    }

    public function allowedKeyTypes(): array
    {
        return ['EC', 'OKP'];
    }

    public function getKeyManagementMode(): string
    {
        return self::MODE_WRAP;
    }

    abstract protected function getWrapper(): WrapperInterface;

    abstract protected function getKeyLength(): int;
}

The same content is in 135 releases, Joomla 5.1.0-beta1 to 6.2.1. See them all, or every version of this file.