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

Class PK11Slot

object --+
         |
        PK11Slot

An object representing a PKCS #11 Slot

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, ...)
length

get_best_key_length(mechanism)
:Parameters: mechanism : int key mechanism enumeration constant (CKM_*)
mechanism

get_best_wrap_mechanism()
Find the best key wrap mechanism for this slot.
bool

is_hw()
Finds out whether a slot is implemented in hardware or software.
bool

is_present()
Finds out whether the token for a slot is available.
bool

is_read_only()
Finds out whether a slot is read-only.
 
key_gen(...)
key_gen(mechanism, sec_param, key_size, [user_data1, ...]) -> PK11SymKey object

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

Properties [hide private]
  slot_name
slot name
  token_name
token name

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__

get_best_key_length(mechanism)

 
:Parameters:
    mechanism : int
        key mechanism enumeration constant (CKM_*)

Return the best key length for this slot and mechanism.
A zero result means that token knows how long the key should be,
the result is typically used with key_gen(), token_key_gen(), or
token_key_gen_with_flags()

Returns:
length

key_gen(...)

 
key_gen(mechanism, sec_param, key_size, [user_data1, ...]) -> PK11SymKey object

:Parameters:
    mechanism : int
        key mechanism enumeration constant (CKM_*)
    key_param : SecItem object or None
        SecItem key parameters. None is also valid.
    key_size : int
        key length (use get_best_key_length())
    user_dataN : object ...
        zero or more caller supplied parameters which will
        be passed to the password callback function

Generate a symmetric key.