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

Function Decrypt

cipher/xor/xor.go:23–29  ·  view source on GitHub ↗

Decrypt decrypts with Xor encryption

(key byte, cipherText []byte)

Source from the content-addressed store, hash-verified

21
22// Decrypt decrypts with Xor encryption
23func Decrypt(key byte, cipherText []byte) []byte {
24 plainText := []byte{}
25 for _, ch := range cipherText {
26 plainText = append(plainText, key^ch)
27 }
28 return plainText
29}

Callers 3

ExampleFunction · 0.70
TestXorCipherDecryptFunction · 0.70
FuzzXORFunction · 0.70

Calls

no outgoing calls

Tested by 3

ExampleFunction · 0.56
TestXorCipherDecryptFunction · 0.56
FuzzXORFunction · 0.56