|
|
@ -45,10 +45,10 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
/** Encrypts and signs the message with the given keys. */
|
|
|
|
/** Encrypts and signs the message with the given keys. */
|
|
|
|
virtual int encsign( Block& , const KeyIDList& ,
|
|
|
|
virtual int encsign( Block& , const KeyIDList& ,
|
|
|
|
const TQString& = 0) { return OK; }
|
|
|
|
const TQString& = TQString::null) { return OK; }
|
|
|
|
|
|
|
|
|
|
|
|
/** Decrypts the message. */
|
|
|
|
/** Decrypts the message. */
|
|
|
|
virtual int decrypt( Block& , const TQString& = 0) { return OK; }
|
|
|
|
virtual int decrypt( Block& , const TQString& = TQString::null) { return OK; }
|
|
|
|
|
|
|
|
|
|
|
|
/** Verifies the message. */
|
|
|
|
/** Verifies the message. */
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
@ -86,9 +86,9 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
protected:
|
|
|
|
virtual int run( const char *cmd, const TQString& passphrase = 0,
|
|
|
|
virtual int run( const char *cmd, const TQString &passphrase = TQString::null,
|
|
|
|
bool onlyReadFromPGP = false );
|
|
|
|
bool onlyReadFromPGP = false );
|
|
|
|
virtual int runGpg( const char *cmd, const TQString& passphrase = 0,
|
|
|
|
virtual int runGpg( const char *cmd, const TQString &passphrase = TQString::null,
|
|
|
|
bool onlyReadFromGnuPG = false );
|
|
|
|
bool onlyReadFromGnuPG = false );
|
|
|
|
virtual void clear();
|
|
|
|
virtual void clear();
|
|
|
|
|
|
|
|
|
|
|
@ -115,10 +115,10 @@ public:
|
|
|
|
virtual ~Base2();
|
|
|
|
virtual ~Base2();
|
|
|
|
|
|
|
|
|
|
|
|
virtual int encrypt( Block& block, const KeyIDList& recipients );
|
|
|
|
virtual int encrypt( Block& block, const KeyIDList& recipients );
|
|
|
|
virtual int clearsign( Block& block, const TQString& passphrase );
|
|
|
|
virtual int clearsign( Block& block, const TQString &passphrase );
|
|
|
|
virtual int encsign( Block& block, const KeyIDList& recipients,
|
|
|
|
virtual int encsign( Block& block, const KeyIDList& recipients,
|
|
|
|
const TQString& passphrase = 0 );
|
|
|
|
const TQString &passphrase = TQString::null );
|
|
|
|
virtual int decrypt( Block& block, const TQString& passphrase = 0 );
|
|
|
|
virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
|
|
|
|
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
@ -127,7 +127,7 @@ public:
|
|
|
|
virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual TQCString getAsciiPublicKey( const KeyID& keyID );
|
|
|
|
virtual TQCString getAsciiPublicKey( const KeyID& keyID );
|
|
|
|
virtual int signKey( const KeyID& keyID, const TQString& passphrase );
|
|
|
|
virtual int signKey( const KeyID& keyID, const TQString &passphrase );
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
protected:
|
|
|
|
KeyList doGetPublicKeys( const TQCString & cmd,
|
|
|
|
KeyList doGetPublicKeys( const TQCString & cmd,
|
|
|
@ -147,10 +147,10 @@ public:
|
|
|
|
virtual ~BaseG();
|
|
|
|
virtual ~BaseG();
|
|
|
|
|
|
|
|
|
|
|
|
virtual int encrypt( Block& block, const KeyIDList& recipients );
|
|
|
|
virtual int encrypt( Block& block, const KeyIDList& recipients );
|
|
|
|
virtual int clearsign( Block& block, const TQString& passphrase );
|
|
|
|
virtual int clearsign( Block& block, const TQString &passphrase );
|
|
|
|
virtual int encsign( Block& block, const KeyIDList& recipients,
|
|
|
|
virtual int encsign( Block& block, const KeyIDList& recipients,
|
|
|
|
const TQString& passphrase = 0 );
|
|
|
|
const TQString &passphrase = TQString::null );
|
|
|
|
virtual int decrypt( Block& block, const TQString& passphrase = 0 );
|
|
|
|
virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
|
|
|
|
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
@ -159,7 +159,7 @@ public:
|
|
|
|
virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual TQCString getAsciiPublicKey( const KeyID& keyID );
|
|
|
|
virtual TQCString getAsciiPublicKey( const KeyID& keyID );
|
|
|
|
virtual int signKey( const KeyID& keyID, const TQString& passphrase );
|
|
|
|
virtual int signKey( const KeyID& keyID, const TQString &passphrase );
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
|
|
|
|
Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
|
|
|
@ -175,10 +175,10 @@ public:
|
|
|
|
virtual ~Base5();
|
|
|
|
virtual ~Base5();
|
|
|
|
|
|
|
|
|
|
|
|
virtual int encrypt( Block& block, const KeyIDList& recipients );
|
|
|
|
virtual int encrypt( Block& block, const KeyIDList& recipients );
|
|
|
|
virtual int clearsign( Block& block, const TQString& passphrase );
|
|
|
|
virtual int clearsign( Block& block, const TQString &passphrase );
|
|
|
|
virtual int encsign( Block& block, const KeyIDList& recipients,
|
|
|
|
virtual int encsign( Block& block, const KeyIDList& recipients,
|
|
|
|
const TQString& passphrase = 0 );
|
|
|
|
const TQString &passphrase = TQString::null );
|
|
|
|
virtual int decrypt( Block& block, const TQString& passphrase = 0 );
|
|
|
|
virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
|
|
|
|
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
@ -187,7 +187,7 @@ public:
|
|
|
|
virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
|
|
|
|
virtual TQCString getAsciiPublicKey( const KeyID& keyID );
|
|
|
|
virtual TQCString getAsciiPublicKey( const KeyID& keyID );
|
|
|
|
virtual int signKey( const KeyID& keyID, const TQString& passphrase );
|
|
|
|
virtual int signKey( const KeyID& keyID, const TQString &passphrase );
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
|
|
|
|
Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
|
|
|
@ -204,7 +204,7 @@ public:
|
|
|
|
Base6();
|
|
|
|
Base6();
|
|
|
|
virtual ~Base6();
|
|
|
|
virtual ~Base6();
|
|
|
|
|
|
|
|
|
|
|
|
virtual int decrypt( Block& block, const TQString& passphrase = 0 );
|
|
|
|
virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
virtual int verify( Block& block ) { return decrypt( block, 0 ); }
|
|
|
|
|
|
|
|
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
|
virtual Key* readPublicKey( const KeyID& keyID,
|
|
|
|