MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / encrypt_message

Function encrypt_message

ciphers/simple_substitution_cipher.py:34–39  ·  view source on GitHub ↗

>>> encrypt_message('LFWOAYUISVKMNXPBDCRJTQEGHZ', 'Harshil Darji') 'Ilcrism Olcvs'

(key: str, message: str)

Source from the content-addressed store, hash-verified

32
33
34def encrypt_message(key: str, message: str) -> str:
35 """
36 >>> encrypt_message('LFWOAYUISVKMNXPBDCRJTQEGHZ', 'Harshil Darji')
37 'Ilcrism Olcvs'
38 """
39 return translate_message(key, message, "encrypt")
40
41
42def decrypt_message(key: str, message: str) -> str:

Callers 1

mainFunction · 0.70

Calls 1

translate_messageFunction · 0.70

Tested by

no test coverage detected