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

Class PK11Context

object --+
         |
        PK11Context



Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T

__new__(T, S, ...)
 
__repr__(x)
repr(x)
 
__str__(x)
str(x)
data

cipher_op(data)
:Parameters: data : any read buffer compatible object (e.g.
PK11Context

clone_context(context)
:Parameters: context : PK11Context object The PK11Context to be cloned
 
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)
:Parameters: sym_key : PK11SymKey object symmetric key
 
digest_op(data)
:Parameters: data : any read buffer compatible object (e.g.
 
finalize()
Clean up cipher operation so that any pending multi-part operations have been flushed.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 


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

Overrides: object.__new__

__repr__(x)
(Representation operator)

 
repr(x)

Overrides: object.__repr__

__str__(x)
(Informal representation operator)

 
str(x)

Overrides: object.__str__

cipher_op(data)

 
:Parameters:
    data : any read buffer compatible object (e.g. buffer or string)
        raw data to compute digest from

Execute a digest/signature operation.

Returns:
data

clone_context(context)

 
:Parameters:
    context : PK11Context object
        The PK11Context to be cloned

Create a new PK11Context which is clone of the supplied context.

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)

 
:Parameters:
    sym_key : PK11SymKey object
        symmetric key

Continues a multiple-part message-digesting operation by digesting the
value of a secret key.

digest_op(data)

 
:Parameters:
    data : any read buffer compatible object (e.g. buffer or string)
        raw data to compute digest from

Execute a digest/signature operation.

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