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

Function encrypt_message

ciphers/mono_alphabetic_ciphers.py:31–36  ·  view source on GitHub ↗

>>> encrypt_message("QWERTYUIOPASDFGHJKLZXCVBNM", "Hello World") 'Pcssi Bidsm'

(key: str, message: str)

Source from the content-addressed store, hash-verified

29
30
31def encrypt_message(key: str, message: str) -> str:
32 """
33 >>> encrypt_message("QWERTYUIOPASDFGHJKLZXCVBNM", "Hello World")
34 'Pcssi Bidsm'
35 """
36 return translate_message(key, message, "encrypt")
37
38
39def decrypt_message(key: str, message: str) -> str:

Callers 1

mainFunction · 0.70

Calls 1

translate_messageFunction · 0.70

Tested by

no test coverage detected