Skip to content

Commit d0f869b

Browse files
authored
Pycrypto (#947)
1 parent 3d64757 commit d0f869b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ RUN pip install flashtext && \
413413
pip install pytorch-lightning && \
414414
pip install datatable && \
415415
pip install sympy && \
416+
# pycrypto is used by competitions team.
417+
pip install pycrypto && \
416418
/tmp/clean-layer.sh
417419

418420
# Tesseract and some associated utility packages

tests/test_pycrypto.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import unittest
2+
3+
from Crypto.Hash import SHA256
4+
5+
class TestPycrypto(unittest.TestCase):
6+
def test_digest(self):
7+
hash = SHA256.new()
8+
hash.update('message'.encode('utf-8'))
9+
h = hash.digest()
10+
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 commit comments

Comments
 (0)