Skip to content

Commit

Permalink
Some clean up (more to come).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 7, 2014
1 parent cb162d0 commit 306be14
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions pyscrypt/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@

BLOCK_SIZE = 16

# We use the crypto library to test until we finish the pure-python aes-256 CTR library
if False:
from Crypto.Cipher import AES
from Crypto.Util import Counter

class aes(object):
def __init__(self, key):
counter = Counter.new(128, initial_value = 0)
self._aes = AES.new(key, AES.MODE_CTR, counter = counter)

def encrypt(self, plaintext):
return self._aes.encrypt(plaintext)

def decrypt(self, ciphertext):
return self._aes.decrypt(ciphertext)


class InvalidScryptFileFormat(Exception): pass

class ScryptFile(object):
Expand Down Expand Up @@ -150,8 +133,8 @@ def _load_get_attr(self, name):
#newlines = property(lambda s: s._fp.newlines) # This requires more work to make work

# @TODO; test with print
def _set_softspace(self, value):
self._fp.softspace = value
#def _set_softspace(self, value):
# self._fp.softspace = value
#softspace = property(lambda s: s._fp.softspace, _set_softspace)

def fileno(self):
Expand Down

0 comments on commit 306be14

Please sign in to comment.