tRead salt provided with -s for decryption - cream - Stream encryption utility
(HTM) git clone git://git.z3bra.org/cream.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit bf8c65dd212269717385ae0908a772ca1949f54a
(DIR) parent fcfffac48aed0854a2aae5858cf57fb6af29d479
(HTM) Author: Willy Goiffon <contact@z3bra.org>
Date: Tue, 8 Aug 2023 22:21:54 +0200
Read salt provided with -s for decryption
Diffstat:
M cream.go | 9 +++++++++
1 file changed, 9 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/cream.go b/cream.go
t@@ -213,6 +213,15 @@ func main() {
}
readheader(in, &header)
+ if len(saltfile) > 0 {
+ // Read salt from any manually specified fileā¦
+ f, err := os.Open(saltfile)
+ if err != nil {
+ log.Fatal(err)
+ }
+ _, err = f.Read(header.Argon2id_salt[:])
+ f.Close()
+ }
deriv(pass, &key,
header.Argon2id_time_cost,
header.Argon2id_memory_cost,