Package keyczar :: Module keyczar :: Class Crypter
[hide private]
[frames] | no frames]

Class Crypter

source code

object --+        
         |        
   Keyczar --+    
             |    
     Encrypter --+
                 |
                Crypter

Capable of encrypting and decrypting.

Instance Methods [hide private]
 
IsAcceptablePurpose(self, purpose)
Only valid if purpose includes decrypting
source code
string
Decrypt(self, ciphertext)
Decrypts the given ciphertext and returns the plaintext.
source code

Inherited from Encrypter: Encrypt

Inherited from Keyczar: GetKey, __init__, __str__

Inherited from Keyczar (private): _AddKey, _ParseHeader

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

Static Methods [hide private]
Crypter
Read(location)
Return a Crypter object created from FileReader at given location.
source code
Properties [hide private]

Inherited from Keyczar: primary_key, versions

Inherited from object: __class__

Method Details [hide private]

Read(location)
Static Method

source code 

Return a Crypter object created from FileReader at given location.

Parameters:
  • location (string) - pathname of the directory storing the key files
Returns: Crypter
a Crypter to manage the keys stored at the given location and perform encryption and decryption functions.
Overrides: Keyczar.Read

IsAcceptablePurpose(self, purpose)

source code 

Only valid if purpose includes decrypting

Overrides: Keyczar.IsAcceptablePurpose

Decrypt(self, ciphertext)

source code 

Decrypts the given ciphertext and returns the plaintext.

Parameters:
  • ciphertext (string) - Base64 encoded string ciphertext to be decrypted.
Returns: string
plaintext message
Raises: