Your message dated Tue, 27 Mar 2018 10:30:47 -0400
with message-id <[email protected]>
and subject line Re: Bug#894222: libghc-sha-dev: a gibberish in bytestringDigest
has caused the Debian Bug report #894222,
regarding libghc-sha-dev: a gibberish in bytestringDigest
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
894222: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894222
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libghc-sha-dev
Version: 1.6.4.2-6+b1
Severity: normal

When I use bytestringDigest i have a gibberish instead of proper signature. I test it with hmacSha256, sha256 and sha512 with the same result. showDigest works fine. An example is attached.

-- System Information:
Debian Release: 9.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 4.9.0-6-686-pae (SMP w/1 CPU core)
Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8), LANGUAGE=ru_RU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libghc-sha-dev depends on:
ii  ghc [libghc-bytestring-dev-0.10.8.1-3ddfb]  8.0.1-17+b1
ii  libc6                                       2.24-11+deb9u3
pn  libghc-array-dev-0.5.1.1-fa350              <none>
pn  libghc-base-dev-4.9.0.0-1bac3               <none>
pn  libghc-binary-dev-0.8.3.0-567c5             <none>
ii  libgmp10                                    2:6.1.2+dfsg-1

libghc-sha-dev recommends no packages.

Versions of packages libghc-sha-dev suggests:
ii  libghc-sha-doc   1.6.4.2-6
pn  libghc-sha-prof  <none>

-- no debconf information

Attachment: ghci-log
Description: Binary data


--- End Message ---
--- Begin Message ---
Dear Рома,

this is not a bug. SHA.bytestringDigest returns the digest in binary
format. If you hex-encode it, you get the usual textual representation:

Prelude> import qualified Data.ByteString.Lazy.Char8 as LBS
Prelude LBS>  import qualified Data.Digest.Pure.SHA as SHA
Prelude LBS SHA> let signature = SHA.hmacSha256 (LBS.pack "1") (LBS.pack "")
Prelude LBS SHA> signature
49f41477fa1bfc3b4792d5233b6a659f4bc1772692e9d5fe7db0624a300652eb
Prelude LBS SHA> SHA.showDigest signature
"49f41477fa1bfc3b4792d5233b6a659f4bc1772692e9d5fe7db0624a300652eb"
Prelude LBS SHA> let bs = SHA.bytestringDigest signature
Prelude LBS SHA> Data.ByteString.Base16.Lazy.encode bs
"49f41477fa1bfc3b4792d5233b6a659f4bc1772692e9d5fe7db0624a300652eb"


Cheers,
Joachim


Am Dienstag, den 27.03.2018, 20:55 +0700 schrieb Рома Тенцер:
> Package: libghc-sha-dev
> Version: 1.6.4.2-6+b1
> Severity: normal
> 
> When I use bytestringDigest i have a gibberish instead of proper 
> signature. I test it with hmacSha256, sha256 and sha512 with the same 
> result. showDigest works fine. An example is attached.
> 
> -- System Information:
> Debian Release: 9.4
>    APT prefers stable-updates
>    APT policy: (500, 'stable-updates'), (500, 'stable')
> Architecture: i386 (i686)
> 
> Kernel: Linux 4.9.0-6-686-pae (SMP w/1 CPU core)
> Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8), 
> LANGUAGE=ru_RU.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> Versions of packages libghc-sha-dev depends on:
> ii  ghc [libghc-bytestring-dev-0.10.8.1-3ddfb]  8.0.1-17+b1
> ii  libc6                                       2.24-11+deb9u3
> pn  libghc-array-dev-0.5.1.1-fa350              <none>
> pn  libghc-base-dev-4.9.0.0-1bac3               <none>
> pn  libghc-binary-dev-0.8.3.0-567c5             <none>
> ii  libgmp10                                    2:6.1.2+dfsg-1
> 
> libghc-sha-dev recommends no packages.
> 
> Versions of packages libghc-sha-dev suggests:
> ii  libghc-sha-doc   1.6.4.2-6
> pn  libghc-sha-prof  <none>
> 
> -- no debconf information
> 
> _______________________________________________
> Pkg-haskell-maintainers mailing list
> [email protected]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers
-- 
Joachim “nomeata” Breitner
Debian Developer
  [email protected]https://people.debian.org/~nomeata
  XMPP: [email protected] • GPG-Key: 0xF0FBF51F
  https://www.joachim-breitner.de/

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
_______________________________________________
Pkg-haskell-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-haskell-maintainers

Reply via email to