caellion-python-commons: caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key Class Reference

caellion-python-commons

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key Class Reference

This class provides implementation of triple DES algorithm which uses MD5 hash of password as a key (it uses 16-byte key so it is triple DES with 2 keys) More...

## Public Member Functions
def | __init__ (self, password)
| Sets up the class for use. More...
def | encrypt (self, data)
| Encrypts data with 3DES ECB algorithm. More...
def | decrypt (self, cipher)
| Decodes and decrypts Base64-encoded 3DES-encrypted data. More...

## Public Attributes
| password
| encryptionKey

## Static Public Attributes
string | password = ""
string | encryptionKey = ""
| DES3 = None
| padmode = pyDes.PAD_PKCS5

## Detailed Description

This class provides implementation of triple DES algorithm which uses MD5 hash of password as a key (it uses 16-byte key so it is triple DES with 2 keys)

Definition at line 11 of file tripledes.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.__init__ | ( |  | self,
|  |  | password
| ) |  |

Sets up the class for use.

Parameters

  password | password to use for key generation

Definition at line 21 of file tripledes.py.

## Member Function Documentation

## ◆ decrypt()

def caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.decrypt | ( |  | self,
|  |  | cipher
| ) |  |

Decodes and decrypts Base64-encoded 3DES-encrypted data.

Parameters

  cipher | base64-encoded encrypted data to decrypt

Returns
  decrypted string

Definition at line 48 of file tripledes.py.

## ◆ encrypt()

def caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.encrypt | ( |  | self,
|  |  | data
| ) |  |

Encrypts data with 3DES ECB algorithm.

Parameters

  data | data to be encrypted

Returns
  base64-encoded 3DES encrypted string

Definition at line 37 of file tripledes.py.

## Member Data Documentation

## ◆ DES3

caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.DES3 = None
| static

Definition at line 18 of file tripledes.py.

## ◆ encryptionKey [1/2]

string caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.encryptionKey = ""
| static

Definition at line 17 of file tripledes.py.

## ◆ encryptionKey [2/2]

caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.encryptionKey

Definition at line 31 of file tripledes.py.

## ◆ padmode

caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.padmode = pyDes.PAD_PKCS5
| static

Definition at line 19 of file tripledes.py.

## ◆ password [1/2]

string caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.password = ""
| static

Definition at line 16 of file tripledes.py.

## ◆ password [2/2]

caellion.pycommons.encryption.tripledes.TripleDESECBMD5Key.password

Definition at line 27 of file tripledes.py.

The documentation for this class was generated from the following file:

- caellion/pycommons/encryption/tripledes.py