From 209a14eff23fd2f75b1e82288505b04a0596a110 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 29 Aug 2020 13:37:41 -0400 Subject: rename package enc -> hex * Makefile (fmt): fmt lib instead of enc * challenge/c01.go: Use lib instead of enc * challenge/c02.go: Use lib instead of enc * enc/b64.go -> lib/b64.go * enc/hex.go -> lib/hex.go * enc/xor.go -> lib/xor.go --- enc/xor.go | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 enc/xor.go (limited to 'enc/xor.go') 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 -// 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 -} -- cgit v1.2.3