Psr7Middlewares\Utils\CryptTrait::key PHP Method

key() public method

Set the keys to encrypt and authenticate.
public key ( string $key ) : self
$key string The binary key
return self
    public function key($key)
    {
        $this->key = self::hkdf($key, 'KeyForEncryption');
        $this->authentication = self::hkdf($key, 'KeyForAuthentication');
        return $this;
    }