Hi,

I'm trying to generate a SHA1 hash using a private key and a given string,
like so:

(define a-hash (HMAC-SHA1 (string->bytes/locale "foo")
(string->bytes/locale "bar")))

This returns bytes, but when I try to turn those bytes into a string with:

(bytes->string/locale a-hash)

I get:

bytes->string/locale: string is not a well-formed UTF-8 encoding:
#"F\264\354Xa\27\25M\254\324\235fN]c\375\310\216\373Q"

As I have no clue how to diagnose this, I'd appreciate any suggestions or
help.

Thanks,
Shawn
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to