faset over fra Z3950 til google books
This commit is contained in:
17
python/gdata/tlslite/utils/RC4.py
Normal file
17
python/gdata/tlslite/utils/RC4.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Abstract class for RC4."""
|
||||
|
||||
from compat import * #For False
|
||||
|
||||
class RC4:
|
||||
def __init__(self, keyBytes, implementation):
|
||||
if len(keyBytes) < 16 or len(keyBytes) > 256:
|
||||
raise ValueError()
|
||||
self.isBlockCipher = False
|
||||
self.name = "rc4"
|
||||
self.implementation = implementation
|
||||
|
||||
def encrypt(self, plaintext):
|
||||
raise NotImplementedError()
|
||||
|
||||
def decrypt(self, ciphertext):
|
||||
raise NotImplementedError()
|
Reference in New Issue
Block a user