1 #include "../../include/freenet/freenetssk.h"
\r
7 const bool FreenetSSK::SetPrivateKey(const std::string &privatekey)
\r
9 if(ValidBaseKey(privatekey))
\r
11 m_privatekey=privatekey;
\r
20 const bool FreenetSSK::SetPublicKey(const std::string &publickey)
\r
22 if(ValidBaseKey(publickey))
\r
24 m_publickey=publickey;
\r
33 const bool FreenetSSK::ValidBaseKey(const std::string &key) const
\r
39 if(key.find("SSK@")!=0)
\r
43 if(key.size()>0 && key.find("/")!=key.size()-1)
\r
50 const bool FreenetSSK::ValidPrivateKey() const
\r
52 return ValidBaseKey(m_privatekey);
\r
55 const bool FreenetSSK::ValidPublicKey() const
\r
57 return ValidBaseKey(m_publickey);
\r