From 315f214374e96d019bae2d97e64c7e9cf0ef03b2 Mon Sep 17 00:00:00 2001 From: johnabass Date: Thu, 19 Sep 2024 13:21:11 -0700 Subject: [PATCH] updated to the new Hasher interface --- cmd/hash/cli.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/hash/cli.go b/cmd/hash/cli.go index 62be675..694428b 100644 --- a/cmd/hash/cli.go +++ b/cmd/hash/cli.go @@ -45,7 +45,11 @@ func (cmd *Bcrypt) Run(kong *kong.Kong) error { Cost: cmd.Cost, } - _, err := hasher.Hash(kong.Stdout, []byte(cmd.Plaintext)) + digest, err := hasher.Hash([]byte(cmd.Plaintext)) + if err == nil { + digest.WriteTo(kong.Stdout) + } + return err }