Package keyczar :: Module keys
[hide private]
[frames] | no frames]

Module keys

source code

Represents cryptographic keys in Keyczar.

Identifies a key by its hash and type. Includes several subclasses of base class Key.


Author: arkajit.dey@gmail.com (Arkajit Dey)

Classes [hide private]
  Key
Parent class for Keyczar Keys.
  SymmetricKey
Parent class for symmetric keys such as AES, HMAC-SHA1
  AsymmetricKey
Parent class for asymmetric keys.
  AesKey
Represents AES symmetric private keys.
  HmacKey
Represents HMAC-SHA1 symmetric private keys.
  PrivateKey
Represents private keys in Keyczar for asymmetric key pairs.
  PublicKey
Represents public keys in Keyczar for asymmetric key pairs.
  DsaPrivateKey
Represents DSA private keys in an asymmetric DSA key pair.
  RsaPrivateKey
Represents RSA private keys in an asymmetric RSA key pair.
  DsaPublicKey
Represents DSA public keys in an asymmetric DSA key pair.
  RsaPublicKey
Represents RSA public keys in an asymmetric RSA key pair.
Functions [hide private]
 
GenKey(type, size=None)
Generates a key of the given type and length.
source code
 
ReadKey(type, key)
Reads a key of the given type from a JSON string representation.
source code
Function Details [hide private]

GenKey(type, size=None)

source code 

Generates a key of the given type and length.

Parameters:
  • type (keyinfo.KeyType) - the type of key to generate
  • size (integer) - the length in bits of the key to be generated
Returns:
the generated key of the given type and size
Raises:

ReadKey(type, key)

source code 

Reads a key of the given type from a JSON string representation.

Parameters:
  • type (keyinfo.KeyType) - the type of key to read
  • key (string) - the JSON string representation of the key
Returns:
the key object read from the JSON string
Raises: