aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-09-11 16:22:26 -0700
committerDavid Reid <dreid@dreid.org>2013-09-11 16:22:26 -0700
commitdd3c783d59010faddb1cbc1d2d16e5792b913ecf (patch)
tree9783c827cefc06e1cf7ea446df7b94deb62e0942 /cryptography
parent9287c2344c6c91ad838a251d3b6fde2a6ea88b56 (diff)
parent4223df72cf3d3566ae8ccbce7d31dbae7ee25cdd (diff)
downloadcryptography-dd3c783d59010faddb1cbc1d2d16e5792b913ecf.tar.gz
cryptography-dd3c783d59010faddb1cbc1d2d16e5792b913ecf.tar.bz2
cryptography-dd3c783d59010faddb1cbc1d2d16e5792b913ecf.zip
Merge pull request #59 from reaperhulk/cfb-support
CFB support
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/primitives/block/modes.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cryptography/primitives/block/modes.py b/cryptography/primitives/block/modes.py
index 62a1c2c9..0f17a1a5 100644
--- a/cryptography/primitives/block/modes.py
+++ b/cryptography/primitives/block/modes.py
@@ -36,5 +36,14 @@ class OFB(object):
self.nonce = nonce
+class CFB(object):
+ name = "CFB"
+
+ def __init__(self, initialization_vector):
+ super(CFB, self).__init__()
+ self.initialization_vector = initialization_vector
+
+
interfaces.ModeWithInitializationVector.register(CBC)
interfaces.ModeWithNonce.register(OFB)
+interfaces.ModeWithInitializationVector.register(CFB)