ROOT logo
Gled » GLEDCORE » GKeyRSA

class GKeyRSA

 GKeyRSA

 Example of trivial use:

    GKeyRSA k1, k2;
    TBufferFile b(TBuffer::kWrite);
    try {
       k1.ReadPubKey(PubKeyFile(mSaturnIdentity));
       k1.GenerateSecret();
       k1.SendSecret(b);

       b.SetReadMode();
       b.SetBufferOffset(0);

       k2.ReadPrivKey(PrivKeyFile(mSaturnIdentity));
       k2.ReceiveSecret(b);
       if(k1.MatchSecrets(k2)) {
 	cout <<"Secret comparison successful\n";
       } else {
 	cout <<"Secret comparison failed\n";
       }
     }
     catch(Exc_t& exc) {
       cout << "encode test failed: "<< exc << endl;
     }

Function Members (Methods)

public:
GKeyRSA()
GKeyRSA(const GKeyRSA&)
virtual~GKeyRSA()
static TClass*Class()
voidGenerateSecret()
Bool_tGetIsPrivate() const
virtual TClass*IsA() const
boolMatchSecrets(const GKeyRSA& a)
GKeyRSA&operator=(const GKeyRSA&)
voidReadPrivKey(const char* file)
voidReadPubKey(const char* file)
voidReceiveSecret(TBuffer& b)
voidSendSecret(TBuffer& b)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidStreamPubKey(TBuffer& b)
protected:
boolcheck_error()
const char*error_string()
private:
static voidinit_ssl()
static unsigned longssl_id_foo()
static voidssl_locker_foo(int, int, const char*, int)

Data Members

protected:
Bool_tbIsPrivateX{G}
unsigned longmSslError
rsa_st*pKey
private:
static boolinit_done
unsigned char*mSecret
intmSecretLen
static GMutex*s_ssl_mutexen

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void init_ssl()
void ssl_locker_foo(int , int , const char* , int )
unsigned long ssl_id_foo()
bool check_error()
const char* error_string()
GKeyRSA()
~GKeyRSA()
void ReadPubKey(const char* file)
void ReadPrivKey(const char* file)
void GenerateSecret()
void SendSecret(TBuffer& b)
void ReceiveSecret(TBuffer& b)
bool MatchSecrets(const GKeyRSA& a)
void StreamPubKey(TBuffer& b)
GKeyRSA()