public function setSecret($secret, $format = self::FORMAT_RAW)
    {
        if ($format == static::FORMAT_HEX) {
            $secret = hex2bin($secret);
        } elseif ($format == static::FORMAT_BASE32) {
            $secret = $this->base32decode($secret);
        }

        $this->secret = $secret;
    }
public function setSecret($secret, $format = self::FORMAT_RAW)
    {
        if ($format == static::FORMAT_HEX) {
            $secret = hex2bin($secret);
        } elseif ($format == static::FORMAT_BASE32) {
            $secret = $this->base32decode($secret);
        }

        $this->secret = $secret;
    }
public function setSecret ( $ secret , $ format = self :: FORMAT_RAW ) { if ( $ format == static :: FORMAT_HEX ) { $ secret = hex2bin ( $ secret ) ; } elseif ( $ format == static :: FORMAT_BASE32 ) { $ secret = $ this -> base32decode ( $ secret ) ; } $ this -> secret = $ secret ; }
Sets a secret token.

@param string $secret The secret token in format specified in the second parameter
@param [type] $format (optional) The format of the secret token - defaults to raw format
Sets a secret token .