aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-10-18 19:38:04 -0700
committerDonald Stufft <donald@stufft.io>2013-10-18 19:38:04 -0700
commit3069921d3f1fe201f86e69bc50bf270708f2272a (patch)
treed73f154b93e3a20a976ec9bb166a5e52e49469e6 /cryptography
parenta3011beae965fde326d4977d850b2aaa9c7b216e (diff)
parent7e5697c6f597ac6b0550ae3dbcc19482d10f3efe (diff)
downloadcryptography-3069921d3f1fe201f86e69bc50bf270708f2272a.tar.gz
cryptography-3069921d3f1fe201f86e69bc50bf270708f2272a.tar.bz2
cryptography-3069921d3f1fe201f86e69bc50bf270708f2272a.zip
Merge pull request #124 from reaperhulk/hash-saga-sha2
Hash Saga Part 4 (SHA2 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