mirror of
https://github.com/kopia/kopia.git
synced 2026-10-03 23:54:49 -04:00
fix support for encrypted blocks with dash suffix
This commit is contained in:
1 parent
eebb04c0cb
commit
1968e2fa10
1 file changed
+3
@@ -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:])
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user