MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / Decrypt

Function Decrypt

cipher/caesar/caesar.go:31–34  ·  view source on GitHub ↗

Decrypt decrypts by left shift of "key" each character of "input"

(input string, key int)

Source from the content-addressed store, hash-verified

29
30// Decrypt decrypts by left shift of "key" each character of "input"
31func Decrypt(input string, key int) string {
32 // left shift of "key" is same as right shift of 26-"key"
33 return Encrypt(input, 26-key)
34}

Callers 3

TestDecryptFunction · 0.70
ExampleFunction · 0.70
FuzzCaesarFunction · 0.70

Calls 1

EncryptFunction · 0.70

Tested by 3

TestDecryptFunction · 0.56
ExampleFunction · 0.56
FuzzCaesarFunction · 0.56