Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsKeyObject Class Reference

#include <nsKeyModule.h>

Inheritance diagram for nsKeyObject:
Inheritance graph
[legend]
Collaboration diagram for nsKeyObject:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsKeyObject ()
void initKey (in short aAlgorithm, in voidPtr aKey)
voidPtr getKeyObj ()
short getType ()

Public Attributes

const short SYM_KEY = 1
const short PRIVATE_KEY = 2
const short PUBLIC_KEY = 3
const short RC4 = 1
const short AES_CBC = 2

Private Member Functions

 ~nsKeyObject ()
 nsKeyObject (nsKeyObject &)
void CleanUp ()

Private Attributes

PRUint32 mKeyType
PK11SymKey * mSymKey
SECKEYPrivateKey * mPrivateKey
SECKEYPublicKey * mPublicKey

Detailed Description

Definition at line 54 of file nsKeyModule.h.


Constructor & Destructor Documentation

Definition at line 42 of file nsKeyModule.cpp.

Definition at line 48 of file nsKeyModule.cpp.

{
  CleanUp();
}

Here is the call graph for this function:


Member Function Documentation

void nsKeyObject::CleanUp ( void  ) [private]

Definition at line 54 of file nsKeyModule.cpp.

{
  switch (mKeyType) {
    case nsIKeyObject::SYM_KEY:
      PK11_FreeSymKey(mSymKey);
      break;
    
    case nsIKeyObject::PRIVATE_KEY:
      PK11_DeleteTokenPrivateKey(mPrivateKey, PR_TRUE /* force */);
      break;

    case nsIKeyObject::PUBLIC_KEY:
      PK11_DeleteTokenPublicKey(mPublicKey);
      break;
    
    default:
      // probably not initialized, do nothing
      break;
  }
  mKeyType = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

voidPtr nsIKeyObject::getKeyObj ( ) [inherited]
short nsIKeyObject::getType ( ) [inherited]
void nsIKeyObject::initKey ( in short  aAlgorithm,
in voidPtr  aKey 
) [inherited]

Member Data Documentation

const short nsIKeyObject::AES_CBC = 2 [inherited]

Definition at line 48 of file nsIKeyModule.idl.

Definition at line 69 of file nsKeyModule.h.

SECKEYPrivateKey* nsKeyObject::mPrivateKey [private]

Definition at line 73 of file nsKeyModule.h.

SECKEYPublicKey* nsKeyObject::mPublicKey [private]

Definition at line 74 of file nsKeyModule.h.

PK11SymKey* nsKeyObject::mSymKey [private]

Definition at line 72 of file nsKeyModule.h.

const short nsIKeyObject::PRIVATE_KEY = 2 [inherited]

Definition at line 43 of file nsIKeyModule.idl.

const short nsIKeyObject::PUBLIC_KEY = 3 [inherited]

Definition at line 44 of file nsIKeyModule.idl.

const short nsIKeyObject::RC4 = 1 [inherited]

Definition at line 47 of file nsIKeyModule.idl.

const short nsIKeyObject::SYM_KEY = 1 [inherited]

Definition at line 42 of file nsIKeyModule.idl.


The documentation for this class was generated from the following files: