MCPcopy Create free account
hub / github.com/SecurityInnovation/PGPy / cipher

Method cipher

pgpy/constants.py:191–207  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189
190 @property
191 def cipher(self):
192 bs = {SymmetricKeyAlgorithm.IDEA: algorithms.IDEA,
193 SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES,
194 SymmetricKeyAlgorithm.CAST5: algorithms.CAST5,
195 SymmetricKeyAlgorithm.Blowfish: algorithms.Blowfish,
196 SymmetricKeyAlgorithm.AES128: algorithms.AES,
197 SymmetricKeyAlgorithm.AES192: algorithms.AES,
198 SymmetricKeyAlgorithm.AES256: algorithms.AES,
199 SymmetricKeyAlgorithm.Twofish256: namedtuple('Twofish256', ['block_size'])(block_size=128),
200 SymmetricKeyAlgorithm.Camellia128: algorithms.Camellia,
201 SymmetricKeyAlgorithm.Camellia192: algorithms.Camellia,
202 SymmetricKeyAlgorithm.Camellia256: algorithms.Camellia}
203
204 if self in bs:
205 return bs[self]
206
207 raise NotImplementedError(repr(self))
208
209 @property
210 def is_supported(self):

Callers 2

_encryptFunction · 0.80
_decryptFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected