Psr7Middlewares\Utils\CryptTrait::checkKey PHP Method

checkKey() private method

Check whether the key exists or not.
private checkKey ( )
    private function checkKey()
    {
        if (empty($this->key) || empty($this->authentication)) {
            $key = $this->secureRandomKey();
            $message = 'No binary key provided to encrypt/decrypt data.';
            if ($key !== null) {
                $message .= sprintf(" For example: base64_decode('%s')", base64_encode($key));
            }
            throw new RuntimeException($message);
        }
    }