ParagonIE\Halite\Symmetric\AuthenticationKey::__construct PHP Method

__construct() public method

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