Check file version

This commit is contained in:
Evan Su 2021-12-22 12:03:38 -05:00 committed by GitHub
parent 82c21b2986
commit 64a032e63f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -1020,6 +1020,14 @@ func onDrop(names []string) {
fin.Close()
return
}
if string(tmp) == "v1.17" || string(tmp) == "v1.18" || string(tmp) == "v1.19" ||
string(tmp) == "v1.20" || string(tmp) == "v1.21" {
resetUI()
mainStatus = "Please use Picocrypt v1.21 to decrypt this file."
mainStatusColor = color.RGBA{0xff, 0x00, 0x00, 0xff}
fin.Close()
return
}
tmp = make([]byte, 15)
fin.Read(tmp)
tmp, err = rsDecode(rs5, tmp)