diff options
author | rsiddharth <s@ricketyspace.net> | 2021-02-24 16:56:39 -0500 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2021-02-24 16:56:39 -0500 |
commit | 53880fb4b3f904ccfbf3c47ddad0343064b36f5e (patch) | |
tree | 9b1ee103c78718e26d696b3b68461e250199098b /challenge/c07.go | |
parent | ffc4a870d29d2fb2816b81df66fc936bfb99785f (diff) |
challenge/c07.go: refactor
Keep everything inside C7
Diffstat (limited to 'challenge/c07.go')
-rw-r--r-- | challenge/c07.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/challenge/c07.go b/challenge/c07.go index bce898a..f2872b7 100644 --- a/challenge/c07.go +++ b/challenge/c07.go @@ -5,10 +5,12 @@ package challenge import ( "fmt" + "ricketyspace.net/cryptopals/lib" ) -var cipher07 string = `CRIwqt4+szDbqkNY+I0qbDe3LQz0wiw0SuxBQtAM5TDdMbjCMD/venUDW9BL +func C7() { + cipher := `CRIwqt4+szDbqkNY+I0qbDe3LQz0wiw0SuxBQtAM5TDdMbjCMD/venUDW9BL PEXODbk6a48oMbAY6DDZsuLbc0uR9cp9hQ0QQGATyyCESq2NSsvhx5zKlLtz dsnfK5ED5srKjK7Fz4Q38/ttd+stL/9WnDzlJvAo7WBsjI5YJc2gmAYayNfm CW2lhZE/ZLG0CBD2aPw0W417QYb4cAIOW92jYRiJ4PTsBBHDe8o4JwqaUac6 @@ -72,12 +74,10 @@ RA3PIfmvGfMUGFVWlyS7+O73l5oIJHxuaJrR4EenzAu4Avpa5d+VuiYbM10a LaVegVPvFn4pCP4U/Nbbw4OTCFX2HKmWEiVBB0O3J9xwXWpxN1Vr5CDi75Fq NhxYCjgSJzWOUD34Y1dAfcj57VINmQVEWyc8Tch8vg9MnHGCOfOjRqp0VGyA S15AVD2QS1V6fhRimJSVyT6QuGb8tKRsl2N+a2Xze36vgMhw7XK7zh//jC2H` + key := "YELLOW SUBMARINE" -var key07 = "YELLOW SUBMARINE" - -func C7() { - c := lib.Base64ToBytes(cipher07) - k := lib.StrToBytes(key07) + c := lib.Base64ToBytes(cipher) + k := lib.StrToBytes(key) o := lib.AESDecryptECB(c, k) fmt.Printf("%v", lib.BytesToStr(o)) |