tRemove debug output - cream - Stream encryption utility
(HTM) git clone git://git.z3bra.org/cream.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 2df6a701ab4764289b076806a5d00778273541a5
(DIR) parent c20636e06c09dd5073331608bf52e6cba3593e9b
(HTM) Author: Willy Goiffon <contact@z3bra.org>
Date: Tue, 18 Oct 2022 15:05:55 +0200
Remove debug output
Diffstat:
M cream.go | 19 -------------------
1 file changed, 0 insertions(+), 19 deletions(-)
---
(DIR) diff --git a/cream.go b/cream.go
t@@ -47,21 +47,6 @@ func usage() {
os.Exit(2)
}
-func dumpheader(h Header) {
- fmt.Fprintln(os.Stderr, "CREAM")
- fmt.Fprintf(os.Stderr, "magic\t%s (% x)\n", string(h.Cream_magic[:]), h.Cream_magic)
- fmt.Fprintf(os.Stderr, "version\t%d\n", h.Cream_version)
- fmt.Fprintln(os.Stderr, "\nXCHACHA20POLY1305:")
- fmt.Fprintf(os.Stderr, "keylen\t%d\n", h.Xchacha20poly1305_key_len)
- fmt.Fprintf(os.Stderr, "IV len\t%d\n", h.Xchacha20poly1305_iv_len)
- fmt.Fprintf(os.Stderr, "Block len\t%d\n", h.Xchacha20poly1305_buf_len)
- fmt.Fprintln(os.Stderr, "\nARGON2ID")
- fmt.Fprintf(os.Stderr, "time\t%d\n", h.Argon2id_time_cost)
- fmt.Fprintf(os.Stderr, "memory\t%d\n", h.Argon2id_memory_cost)
- fmt.Fprintf(os.Stderr, "thread(s)\t%d\n", h.Argon2id_threads)
- fmt.Fprintf(os.Stderr, "salt\t% x\n", h.Argon2id_salt)
-}
-
func readheader(f *os.File, h *Header) {
err := binary.Read(f, binary.BigEndian, h)
if err != nil {
t@@ -75,8 +60,6 @@ func readheader(f *os.File, h *Header) {
if h.Cream_version > cream_version {
log.Fatal("Version %d not handled", h.Cream_version)
}
-
- dumpheader(*h)
}
func deriv(pw []byte, key *[]byte, time, mem, job uint32, salt []byte) {
t@@ -93,8 +76,6 @@ func encrypt(in *os.File, out *os.File, key []byte, h Header) {
log.Fatal(err)
}
- dumpheader(h)
-
binary.Write(out, binary.BigEndian, h)
if err != nil {
log.Fatal(err)