From f0521d8df2191956e1a2ab47860792dbfbf60d87 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Wed, 24 Feb 2021 16:49:59 -0500 Subject: challenge/c05.go: refactor Keep everything inside C5 --- challenge/c05.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'challenge/c05.go') diff --git a/challenge/c05.go b/challenge/c05.go index c794e15..a9b1682 100644 --- a/challenge/c05.go +++ b/challenge/c05.go @@ -5,18 +5,16 @@ package challenge import ( "fmt" + "ricketyspace.net/cryptopals/lib" ) -var icebaby string = `Burning 'em, if you ain't quick and nimble -I go crazy when I hear a cymbal` - -var key string = "ICE" - func C5() { + icebaby := `Burning 'em, if you ain't quick and nimble +I go crazy when I hear a cymbal` + key := "ICE" es := lib.RepeatingXOR(icebaby, key) hs := lib.AsciiStrToHexStr(es) - fmt.Printf("RepeatingXOR('%v', '%v') = %v\n", icebaby, key, hs) } -- cgit v1.2.3