aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-18 21:07:36 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-18 21:24:05 -0500
commit7e5697c6f597ac6b0550ae3dbcc19482d10f3efe (patch)
treed73f154b93e3a20a976ec9bb166a5e52e49469e6 /cryptography
parenta3011beae965fde326d4977d850b2aaa9c7b216e (diff)
downloadcryptography-7e5697c6f597ac6b0550ae3dbcc19482d10f3efe.tar.gz
cryptography-7e5697c6f597ac6b0550ae3dbcc19482d10f3efe.tar.bz2
cryptography-7e5697c6f597ac6b0550ae3dbcc19482d10f3efe.zip
SHA-2 family support
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/primitives/hashes.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/cryptography/primitives/hashes.py b/cryptography/primitives/hashes.py
index d74287f9..d004c45c 100644
--- a/cryptography/primitives/hashes.py
+++ b/cryptography/primitives/hashes.py
@@ -46,3 +46,27 @@ class SHA1(BaseHash):
name = "sha1"
digest_size = 20
block_size = 64
+
+
+class SHA224(BaseHash):
+ name = "sha224"
+ digest_size = 28
+ block_size = 64
+
+
+class SHA256(BaseHash):
+ name = "sha256"
+ digest_size = 32
+ block_size = 64
+
+
+class SHA384(BaseHash):
+ name = "sha384"
+ digest_size = 48
+ block_size = 128
+
+
+class SHA512(BaseHash):
+ name = "sha512"
+ digest_size = 64
+ block_size = 128