summaryrefslogblamecommitdiffstats
path: root/challenge/c03.go
blob: 019aaff2017f1d641529df6859e1a2ce82e2bd2f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                    
// Copyright © 2020 rsiddharth <s@ricketyspace.net>
// SPDX-License-Identifier: ISC

package challenge

import (
	"fmt"
	"ricketyspace.net/cryptopals/lib"
)

func C3() {
	hs := "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
	k, ds, scr := lib.XORCrackSingleKey(hs)

	fmt.Printf("Key is '%c' (Score: %v)\n", k, scr)
	fmt.Printf("Decrypted string: %v\n", ds)
}