Package nss :: Module nss :: Class PK11Context
[hide private]
[frames] | no frames]

type PK11Context

object --+
         |
        PK11Context

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
data
cipher_op(data)
Execute a digest/signature operation.
PK11Context
clone_context(context)
Create a new PK11Context which is clone of the supplied context.
 
digest_begin()
Start a new digesting or Mac'ing operation on this context.
data
digest_final()
Completes the multi-part cryptographic operation in progress on this context and returns any final data which may have been pending in the context (i.e.
 
digest_key(sym_key)
Continues a multiple-part message-digesting operation by digesting the value of a secret key.
 
digest_op(data)
Execute a digest/signature operation.
 
finalize()
Clean up cipher operation so that any pending multi-part operations have been flushed.
Method Details [hide private]

__init__(...)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

cipher_op(data)

 
Execute a digest/signature operation.
Parameters:
  • data (any read buffer compatible object (e.g. buffer or string)) - raw data to compute digest from
Returns: data

clone_context(context)

 
Create a new PK11Context which is clone of the supplied context.
Parameters:
  • context (PK11Context object) - The PK11Context to be cloned
Returns: PK11Context

digest_final()

 
Completes the multi-part cryptographic operation in progress on this context and returns any final data which may have been pending in the context (i.e. the output data is flushed from the context). If there was no final data the returned data buffer will have a length of zero.
Returns: data

digest_key(sym_key)

 
Continues a multiple-part message-digesting operation by digesting the value of a secret key.
Parameters:
  • sym_key (PK11SymKey object) - symmetric key

digest_op(data)

 
Execute a digest/signature operation.
Parameters:
  • data (any read buffer compatible object (e.g. buffer or string)) - raw data to compute digest from

finalize()

 

Clean up cipher operation so that any pending multi-part operations have been flushed. Any pending output which would have been available as a result of the flush is discarded. The context is left in a state available for reuse.

WARNING: Currently context reuse only works for digest contexts not encryption/decryption contexts