diff options
Diffstat (limited to 'enc/xor.go')
-rw-r--r-- | enc/xor.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/enc/xor.go b/enc/xor.go deleted file mode 100644 index fe412b2..0000000 --- a/enc/xor.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2020 rsiddharth <s@ricketyspace.net> -// SPDX-License-Identifier: ISC - -package enc - -func FixedXOR(a, b string) string { - cs := "" - if len(a) != len(b) { - return cs - } - - ab := []byte(a) - bb := []byte(b) - for i := 0; i < len(ab); i++ { - p := HexCharToDec(ab[i]) - q := HexCharToDec(bb[i]) - r := DecToHexChar(p ^ q) - - cs += string(r) - } - return cs -} |