some small fixes

This commit is contained in:
Mari Wahl 2014-10-11 01:08:01 -04:00
parent a50737bc6b
commit 52067188ed
11 changed files with 65 additions and 0 deletions

View file

@ -1,25 +0,0 @@
package main
import (
"fmt"
"os"
)
func main() {
file, err := os.Open("ataylor.png")
if err != nil {
fmt.Println(err)
return
}
info, _ := os.Stat("ataylor.png")
input := make([]byte, info.Size())
out := make([]byte, len(input))
file.Read(input)
key := [...]byte{0x43, 0x53, 0x41, 0x57} // CSAW
for i := 0; i < len(input); i++ {
out[i] = input[i] ^ key[i%len(key)]
}
fmt.Println(string(out))
}