mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2025-05-12 13:48:31 +02:00
two os.Removes conflict, allow them to err
deniability and split
This commit is contained in:
parent
0cc109bc6b
commit
268055804e
1 changed files with 4 additions and 8 deletions
|
@ -2510,9 +2510,7 @@ func work() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
if deniability {
|
if deniability {
|
||||||
if err := os.Remove(strings.TrimSuffix(inputFile, ".tmp")); err != nil {
|
os.Remove(strings.TrimSuffix(inputFile, ".tmp"))
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2558,9 +2556,7 @@ func work() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if mode == "decrypt" && deniability {
|
if mode == "decrypt" && deniability {
|
||||||
if err := os.Remove(inputFile); err != nil {
|
os.Remove(inputFile)
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if mode == "decrypt" && !kept && autoUnzip {
|
if mode == "decrypt" && !kept && autoUnzip {
|
||||||
|
@ -2710,7 +2706,7 @@ func rsDecode(rs *infectious.FEC, data []byte) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp := make([]infectious.Share, rs.Total())
|
tmp := make([]infectious.Share, rs.Total())
|
||||||
for i := 0; i < rs.Total(); i++ {
|
for i := range rs.Total() {
|
||||||
tmp[i].Number = i
|
tmp[i].Number = i
|
||||||
tmp[i].Data = append(tmp[i].Data, data[i])
|
tmp[i].Data = append(tmp[i].Data, data[i])
|
||||||
}
|
}
|
||||||
|
@ -2757,7 +2753,7 @@ func genPassword() string {
|
||||||
chars += "-=_+!@#$^&()?<>"
|
chars += "-=_+!@#$^&()?<>"
|
||||||
}
|
}
|
||||||
tmp := make([]byte, passgenLength)
|
tmp := make([]byte, passgenLength)
|
||||||
for i := 0; i < int(passgenLength); i++ {
|
for i := range int(passgenLength) {
|
||||||
j, _ := rand.Int(rand.Reader, big.NewInt(int64(len(chars))))
|
j, _ := rand.Int(rand.Reader, big.NewInt(int64(len(chars))))
|
||||||
tmp[i] = chars[j.Int64()]
|
tmp[i] = chars[j.Int64()]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue