Compare commits
2 Commits
128c53a11d
...
6ffb24b544
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ffb24b544 | |||
|
|
fd77a047f9 |
@@ -68,6 +68,11 @@ func DecryptWithIdentity(data []byte, identity age.Identity) (*memguard.LockedBu
|
||||
// Create a secure buffer for the decrypted data
|
||||
resultBuffer := memguard.NewBufferFromBytes(result)
|
||||
|
||||
// Zero out the original slice to prevent plaintext from lingering in unprotected memory
|
||||
for i := range result {
|
||||
result[i] = 0
|
||||
}
|
||||
|
||||
return resultBuffer, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user