Package conary :: Package lib :: Module openpgpfile :: Class PGP_SecretAnyKey
[hide private]
[frames] | no frames]

Class PGP_SecretAnyKey

source code

    object --+            
             |            
PGP_BasePacket --+        
                 |        
    PGP_BaseKeySig --+    
                     |    
               PGP_Key --+
                         |
                        PGP_SecretAnyKey
Known Subclasses:
PGP_SecretKey, PGP_SecretSubKey

Instance Methods [hide private]
 
initialize(self)
initialize is executed at object creation time, after setUp(), and generally everywhere the state has to be reset.
source code
 
parse(self, force=False)
Parse the signature body and initializes the internal data structures for other operations
source code
 
_getSecretMPICount(self) source code
 
toPublicKey(self, minHeaderLen=2) source code
 
decrypt(self, passPhrase) source code
 
makePgpKey(self, passPhrase=None) source code
 
getCryptoKey(self, passPhrase) source code
 
sign(self, packet, passwordCallback, sigType=None, creation=None, expiration=None, trustLevel=None, trustAmount=None, trustRegex=None, **kwargs)
Sign packet (user packet only).
source code

Inherited from PGP_Key: adoptSignature, assertSigningKey, getCreatedTimestamp, getEndOfLife, getKeyFingerprint, getKeyId, getPublicKeyTuple, iterAllSelfSignatures, iterSelfSignatures

Inherited from PGP_BaseKeySig: readMPIs, skipMPIs

Inherited from PGP_BaseKeySig (private): _getMPICount, _readMPIs

Inherited from PGP_BasePacket: __init__, clone, getBodyStream, getParentPacket, isEmpty, next, readBin, readBody, readExact, resetBody, seek, setNextStream, setParentPacket, setUp, write, writeAll, writeBody, writeHeader

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]

Inherited from PGP_BaseKeySig (private): _readCountMPIs, _writeMPI

Inherited from PGP_BasePacket: checkStreamLength, readTimestamp

Class Variables [hide private]
  pubTag = None
  _hashes = ['Unknown', <module 'md5' from '/usr/lib64/python2.4...
  _ciphers = [('Unknown', 0), ('IDEA', 0), (<module 'Crypto.Ciph...
  _legalCiphers = set([2, 3, 4, 7, 8, 9])

Inherited from PGP_Key: tag

Inherited from PGP_BasePacket: BUFFER_SIZE

Inherited from PGP_BasePacket (private): _parentPacketTypes

Properties [hide private]
  count
  encMpiFile
  hashAlg
  initialVector
  s2k
  s2kType
  salt
  symmEncAlg

Inherited from PGP_Key: createdTimestamp, daysValid, mpiFile, mpiLen, pubKeyAlg, version

Inherited from PGP_Key (private): _keyId, _parsed

Inherited from PGP_BasePacket: bodyLength, headerLength

Inherited from object: __class__

Method Details [hide private]

initialize(self)

source code 
initialize is executed at object creation time, after setUp(), and generally everywhere the state has to be reset. To be overridden by various subclasses
Overrides: PGP_Key.initialize

parse(self, force=False)

source code 
Parse the signature body and initializes the internal data structures for other operations
Overrides: PGP_Key.parse
(inherited documentation)

makePgpKey(self, passPhrase=None)

source code 
Overrides: PGP_Key.makePgpKey

getCryptoKey(self, passPhrase)

source code 
Overrides: PGP_Key.getCryptoKey

sign(self, packet, passwordCallback, sigType=None, creation=None, expiration=None, trustLevel=None, trustAmount=None, trustRegex=None, **kwargs)

source code 
Sign packet (user packet only). If expiration is None, the signature will expire when the key expire, if the key expires, otherwise it does not expire either. To produce a signature that does not expire, regardless of the key's expiration, use -1 for the expiration

Class Variable Details [hide private]

_hashes

Value:
['Unknown',
 <module 'md5' from '/usr/lib64/python2.4/lib-dynload/md5module.so'>,
 <module 'sha' from '/usr/lib64/python2.4/lib-dynload/shamodule.so'>,
 <module 'Crypto.Hash.RIPEMD' from '/usr/lib64/python2.4/site-packages\
/Crypto/Hash/RIPEMD.so'>,
 'Double Width SHA',
 'MD2',
 'Tiger/192',
...

_ciphers

Value:
[('Unknown', 0),
 ('IDEA', 0),
 (<module 'Crypto.Cipher.DES3' from '/usr/lib64/python2.4/site-package\
s/Crypto/Cipher/DES3.so'>,
  192),
 (<module 'Crypto.Cipher.CAST' from '/usr/lib64/python2.4/site-package\
s/Crypto/Cipher/CAST.so'>,
  128),
...