diff options
author | Mike Crute <mike@crute.us> | 2017-10-01 01:31:07 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2017-10-01 01:31:07 +0000 |
commit | d25a9f1b797d84be8362dcb36ea70836db10969d (patch) | |
tree | a1271bbf79be6451eedb627983a776707c3161d7 | |
parent | dd19641addd9537a11552def63a4438fa9aac1c8 (diff) | |
download | pydora-d25a9f1b797d84be8362dcb36ea70836db10969d.tar.bz2 pydora-d25a9f1b797d84be8362dcb36ea70836db10969d.tar.xz pydora-d25a9f1b797d84be8362dcb36ea70836db10969d.zip |
Make crypto class pluggable
-rw-r--r-- | pandora/transport.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pandora/transport.py b/pandora/transport.py index c3fc71c..aeba50d 100644 --- a/pandora/transport.py +++ b/pandora/transport.py | |||
@@ -320,9 +320,9 @@ class Encryptor(object): | |||
320 | API request and response. It handles the formats that the API expects. | 320 | API request and response. It handles the formats that the API expects. |
321 | """ | 321 | """ |
322 | 322 | ||
323 | def __init__(self, in_key, out_key): | 323 | def __init__(self, in_key, out_key, crypto_class=CryptographyBlowfish): |
324 | self.bf_out = CryptographyBlowfish(out_key) | 324 | self.bf_out = crypto_class(out_key) |
325 | self.bf_in = CryptographyBlowfish(in_key) | 325 | self.bf_in = crypto_class(in_key) |
326 | 326 | ||
327 | @staticmethod | 327 | @staticmethod |
328 | def _decode_hex(data): | 328 | def _decode_hex(data): |