Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ vernam_cipher.py
File
vernam_cipher.py
ciphers/vernam_cipher.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
def
vernam_encrypt(plaintext: str, key: str) -> str:
2
""
"
3
>>> vernam_encrypt(
"HELLO"
,
"KEY"
)
4
'RIJVS'
Callers
nothing calls this directly
Calls
2
vernam_encrypt
Function · 0.85
vernam_decrypt
Function · 0.85
Tested by
no test coverage detected