fix support for encrypted blocks with dash suffix

This commit is contained in:
Jarek Kowalski
2017-11-23 23:21:16 -08:00
parent eebb04c0cb
commit 1968e2fa10

View File

@@ -99,6 +99,9 @@ func symmetricEncrypt(createCipher func(key []byte) (cipher.Block, error), key [
}
func decodeHexSuffix(s string, length int) ([]byte, error) {
if p := strings.Index(s, "-"); p >= 0 {
s = s[0:p]
}
return hex.DecodeString(s[len(s)-length:])
}