public function encrypt($token)
    {
        $iv = mcrypt_create_iv(self::IV_SIZE, self::IV_SOURCE);
        $cipherText = mcrypt_encrypt(self::CIPHER, $this->key, $token, self::MODE, $iv);
        return base64_encode($iv . $cipherText);
    }
public function encrypt($token)
    {
        $iv = mcrypt_create_iv(self::IV_SIZE, self::IV_SOURCE);
        $cipherText = mcrypt_encrypt(self::CIPHER, $this->key, $token, self::MODE, $iv);
        return base64_encode($iv . $cipherText);
    }
public function encrypt ( $ token ) { $ iv = mcrypt_create_iv ( self :: IV_SIZE , self :: IV_SOURCE ) ; $ cipherText = mcrypt_encrypt ( self :: CIPHER , $ this -> key , $ token , self :: MODE , $ iv ) ; return base64_encode ( $ iv . $ cipherText ) ; }
Encrypt the OAuth token
@param \stdClass $token Serialized token object
@return string
Encrypt the OAuth token