MCPcopy Index your code
hub / github.com/saltstack/salt / parse_padding_for_encryption

Method parse_padding_for_encryption

salt/crypt.py:308–314  ·  view source on GitHub ↗
(algorithm)

Source from the content-addressed store, hash-verified

306
307 @staticmethod
308 def parse_padding_for_encryption(algorithm):
309 if algorithm not in VALID_ENCRYPTION_ALGORITHMS:
310 raise UnsupportedAlgorithm(f"Invalid encryption algorithm: {algorithm}")
311 _pad, _hash = algorithm.split("-", 1)
312 if _pad not in VALID_PADDING_FOR_ENCRYPTION:
313 raise UnsupportedAlgorithm(f"Invalid padding algorithm: {_pad}")
314 return getattr(padding, _pad)
315
316 @staticmethod
317 def parse_hash(algorithm):

Callers 2

decryptMethod · 0.80
encryptMethod · 0.80

Calls 1

Tested by

no test coverage detected