Commit 092bb69c by Anthony Woods

instead of padding with 0's, cycle through the secret.

parent 40d946a6
......@@ -60,11 +60,7 @@ func encryptionKeyToBytes(secret string) []byte {
keyBytes := []byte(secret)
secretLength := len(keyBytes)
for i := 0; i < 32; i++ {
if secretLength > i {
key[i] = keyBytes[i]
} else {
key[i] = 0
}
key[i] = keyBytes[i%secretLength]
}
return key
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment