#ifndef __CARDKEY_H__ #define __CARDKEY_H__ #include //#include //#include #include #include namespace act { class ITokenKey; } /* * Retains a single RSA key pair and (maybe) the provided PIN which is used to authenticate for usage of * this key */ class SecOpGuard; class CardKey { public: CardKey(act::ITokenKey* token_key); ~CardKey(); inline act::ITokenKey* getKey() const { return m_token_key.get(); } // NOTE: Contents of source string will be overwritten for security reasons void setPin(char *pin); void setPin(const act::Blob& pin); void setPin(UI_METHOD *ui_method, void *callback_data); bool Authenticate(SecOpGuard& where); private: std::auto_ptr m_token_key; act::Blob m_pin; }; #endif