MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / vernam_decrypt

Function vernam_decrypt

src/ciphers/vernam.rs:100–133  ·  view source on GitHub ↗

Decrypts a ciphertext string using the Vernam cipher. The function converts all input to uppercase and works only with letters A-Z. The key is repeated cyclically if it's shorter than the ciphertext. # Arguments `ciphertext` - The text to decrypt (will be converted to uppercase) `key` - The decryption key (will be converted to uppercase, must not be empty) # Returns The decrypted plaintext as

(ciphertext: &str, key: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

test_key_wrappingFunction · 0.85
test_empty_key_decryptFunction · 0.85

Calls 2

iterMethod · 0.45
lenMethod · 0.45

Tested by 4

test_key_wrappingFunction · 0.68
test_empty_key_decryptFunction · 0.68