From 60131023dd5b3d28175d4cc5f7519086793482dd Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 29 Apr 2022 15:21:33 +0200 Subject: change 'preimage' to 'message' Issue: #40 --- cmd/sigsum-debug/leaf/hash/hash.go | 4 ++-- cmd/sigsum-debug/leaf/sign/sign.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/sigsum-debug/leaf/hash/hash.go b/cmd/sigsum-debug/leaf/hash/hash.go index 9bc845e..81531b5 100644 --- a/cmd/sigsum-debug/leaf/hash/hash.go +++ b/cmd/sigsum-debug/leaf/hash/hash.go @@ -26,11 +26,11 @@ func Main(args []string, optKeyHash, optSignature string, optShardHint uint64) e return fmt.Errorf("parse signature: %w", err) } - preimage := types.HashFn(data) + message := types.HashFn(data) leaf := types.Leaf{ Statement: types.Statement{ ShardHint: optShardHint, - Checksum: *types.HashFn(preimage[:]), + Checksum: *types.HashFn(message[:]), }, Signature: sig, KeyHash: keyHash, diff --git a/cmd/sigsum-debug/leaf/sign/sign.go b/cmd/sigsum-debug/leaf/sign/sign.go index 348ae23..3b40c32 100644 --- a/cmd/sigsum-debug/leaf/sign/sign.go +++ b/cmd/sigsum-debug/leaf/sign/sign.go @@ -22,10 +22,10 @@ func Main(args []string, optPrivateKey string, optShardHint uint64) error { return fmt.Errorf("parse private key: %w", err) } - preimage := types.HashFn(data) + message := types.HashFn(data) stm := types.Statement{ ShardHint: optShardHint, - Checksum: *types.HashFn(preimage[:]), + Checksum: *types.HashFn(message[:]), } sig, err := stm.Sign(priv) if err != nil { -- cgit v1.2.3