Skip to content

Commit

Permalink
Pycrypto (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philmod committed Jan 26, 2021
1 parent 3d64757 commit d0f869b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ RUN pip install flashtext && \
pip install pytorch-lightning && \
pip install datatable && \
pip install sympy && \
# pycrypto is used by competitions team.
pip install pycrypto && \
/tmp/clean-layer.sh

# Tesseract and some associated utility packages
Expand Down
10 changes: 10 additions & 0 deletions tests/test_pycrypto.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest

from Crypto.Hash import SHA256

class TestPycrypto(unittest.TestCase):
def test_digest(self):
hash = SHA256.new()
hash.update('message'.encode('utf-8'))
h = hash.digest()
self.assertEqual(h, b'\xabS\n\x13\xe4Y\x14\x98+y\xf9\xb7\xe3\xfb\xa9\x94\xcf\xd1\xf3\xfb"\xf7\x1c\xea\x1a\xfb\xf0+F\x0cm\x1d')

0 comments on commit d0f869b

Please sign in to comment.