ParagonIE\Halite\Symmetric\EncryptionKey::__construct PHP 메소드

__construct() 공개 메소드

public __construct ( HiddenString $keyMaterial )
$keyMaterial ParagonIE\Halite\HiddenString - The actual key data
    public function __construct(HiddenString $keyMaterial)
    {
        if (CryptoUtil::safeStrlen($keyMaterial->getString()) !== \Sodium\CRYPTO_STREAM_KEYBYTES) {
            throw new InvalidKey('Encryption key must be CRYPTO_STREAM_KEYBYTES bytes long');
        }
        parent::__construct($keyMaterial);
    }
EncryptionKey