lisp
python
atom
gdata
Crypto
acl
alt
analytics
apps
base
blogger
books
calendar
calendar_resource
codesearch
contacts
docs
dublincore
exif
finance
geo
health
maps
media
notebook
oauth
opensearch
photos
projecthosting
sites
spreadsheet
spreadsheets
tlslite
integration
utils
AES.py
ASN1Parser.py
Cryptlib_AES.py
Cryptlib_RC4.py
Cryptlib_TripleDES.py
OpenSSL_AES.py
OpenSSL_RC4.py
OpenSSL_RSAKey.py
OpenSSL_TripleDES.py
PyCrypto_AES.py
PyCrypto_RC4.py
PyCrypto_RSAKey.py
PyCrypto_TripleDES.py
Python_AES.py
Python_RC4.py
Python_RSAKey.py
RC4.py
RSAKey.py
TripleDES.py
__init__.py
cipherfactory.py
codec.py
compat.py
cryptomath.py
dateFuncs.py
hmac.py
jython_compat.py
keyfactory.py
rijndael.py
xmltools.py
BaseDB.py
Checker.py
FileObject.py
HandshakeSettings.py
Session.py
SessionCache.py
SharedKeyDB.py
TLSConnection.py
TLSRecordLayer.py
VerifierDB.py
X509.py
X509CertChain.py
__init__.py
api.py
constants.py
errors.py
mathtls.py
messages.py
webmastertools
youtube
__init__.py
apps_property.py
auth.py
client.py
core.py
data.py
gauth.py
sample_util.py
service.py
test_config.py
test_data.py
urlfetch.py
web
arguments.txt
commit-file-format.txt
google_interface.py
placement.py
search.py
util.py
worblehat.py
db.txt
17 lines
458 B
Python
17 lines
458 B
Python
"""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() |