summaryrefslogtreecommitdiffstats
path: root/challenge/c12.go
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2021-01-25 00:09:23 -0500
committerrsiddharth <s@ricketyspace.net>2021-01-25 00:09:23 -0500
commit2794332de1e0037f946059effd5f8f312e9d6557 (patch)
treeb52a29613914e49c16ac01861f99445007606609 /challenge/c12.go
parente8144de68e247ebc39ae61745907440042f43d71 (diff)
challenge: freshSheepBlock -> freshSheepBytes
Diffstat (limited to 'challenge/c12.go')
-rw-r--r--challenge/c12.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/challenge/c12.go b/challenge/c12.go
index 8c25fb2..a19777b 100644
--- a/challenge/c12.go
+++ b/challenge/c12.go
@@ -17,7 +17,7 @@ func C12() {
blocksize := findBlockSize()
nbl, us_sz := findUnknownStringCharacteristics(blocksize)
- in := freshSheepBlock(blocksize)
+ in := freshSheepBytes(blocksize)
ds := make([]byte, 0) // deciphered unknown string in bytes
for i := 0; i < nbl; i++ {
nby := blocksize
@@ -35,9 +35,9 @@ func C12() {
fmt.Printf("Unknown String:\n%v", lib.BytesToStr(ds))
}
-func freshSheepBlock(blocksize int) []byte {
- in := make([]byte, blocksize)
- for i := 0; i < blocksize; i++ {
+func freshSheepBytes(n int) []byte {
+ in := make([]byte, n)
+ for i := 0; i < n; i++ {
in[i] = sheep
}
return in