1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/PublicKey.h
12 #ifndef ZYPP_PUBLICKEY_H
13 #define ZYPP_PUBLICKEY_H
21 #include "zypp/base/PtrTypes.h"
22 #include "zypp/Pathname.h"
24 ///////////////////////////////////////////////////////////////////
26 { /////////////////////////////////////////////////////////////////
29 ///////////////////////////////////////////////////////////////////
31 // CLASS NAME : PublicKey
33 /** Class that represent a GPG Public Key
37 friend std::ostream & operator<<( std::ostream & str, const PublicKey & obj );
46 * \throws when data does not make a key
48 PublicKey(const std::istream &data);
49 PublicKey(const Pathname &file);
52 std::string asString() const;
53 std::string armoredData() const;
54 std::string id() const;
55 std::string name() const;
56 std::string fingerprint() const;
59 /** Pointer to implementation */
60 RWCOW_pointer<Impl> _pimpl;
62 ///////////////////////////////////////////////////////////////////
64 /** \relates PublicKey Stream output */
65 inline std::ostream & operator<<( std::ostream & str, const PublicKey & obj )
66 { return str << obj.asString(); }
68 /////////////////////////////////////////////////////////////////
71 ///////////////////////////////////////////////////////////////////
72 #endif // ZYPP_PUBLICKEY_H