[gnutls-devel] Guile-GnuTLS | Missing zeros in digest/sha* output (#18)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Aug 21 04:33:32 CEST 2023

Marius Bakke created an issue: https://gitlab.com/gnutls/guile/-/issues/18


I wrote a simple sha256sum procedure:

(define (digest-sha256 str)
   (map (cut format #f "~x" <>)
        (bytevector->u8-list (hash-direct digest/sha256
                                          (string->utf8 str))))


(digest-sha256 "test")
# echo -n test | sha256sum -

It seems there should be a 0 between `f0` and `a` at the end.  Is this a bug or am I doing something wrong?

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/guile/-/issues/18
You're receiving this email because of your account on gitlab.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230821/eca90ab9/attachment.html>

More information about the Gnutls-devel mailing list