public function generate()
    {
        $usable      = true;
        $this->bytes = openssl_random_pseudo_bytes($this->length, $usable);
        if ($usable === false) {
            // echo "Nonce is weak\n";
        }

        $this->nonce = base64_encode($this->bytes);

        return $this;
    }