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;
    }
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;
    }
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 ; }
Create the nonce.

@return Nonce provides a fluent interface
Create the nonce .