blob: 9dbb3ce03c9d5ed9ed886768ed1a2b205738e5e2 [file] [log] [blame]
Alex Gaynor77ae0cd2016-03-05 14:07:34 -05001# This file is dual licensed under the terms of the Apache License, Version
2# 2.0, and the BSD License. See the LICENSE file in the root of this repository
3# for complete details.
4
5from cryptography import utils
6from cryptography.hazmat.primitives import hashes, serialization
7from cryptography.hazmat.primitives.asymmetric import padding
8from cryptography.hazmat.primitives.ciphers import CipherAlgorithm
9from cryptography.hazmat.primitives.ciphers.modes import Mode
10
11
12@utils.register_interface(CipherAlgorithm)
13class DummyCipherAlgorithm(object):
14 name = "dummy-cipher"
15 block_size = 128
16 key_size = None
17
18
19@utils.register_interface(Mode)
20class DummyMode(object):
21 name = "dummy-mode"
22
23 def validate_for_algorithm(self, algorithm):
24 pass
25
26
27@utils.register_interface(hashes.HashAlgorithm)
28class DummyHashAlgorithm(object):
29 name = "dummy-hash"
30 block_size = None
31 digest_size = None
32
33
34@utils.register_interface(serialization.KeySerializationEncryption)
35class DummyKeySerializationEncryption(object):
36 pass
37
38
39@utils.register_interface(padding.AsymmetricPadding)
40class DummyAsymmetricPadding(object):
41 name = "dummy-padding"