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);
        }
    }
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);
        }
    }
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 ) ; } }
Check whether the key exists or not.

@throws RuntimeException
Check whether the key exists or not .