Re: command line hmac with key in hex

2012-08-02 Thread MITSUNARI Shigeo
Hi,

>You can achieve this using the generalised MAC interface to HMAC like this:
>
>openssl dgst -sha1 -mac HMAC -macopt hexkey:aabbcc

I'm ashamed of my mail. Thank you for your advice.

Yours,
 Shigeo


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: command line hmac with key in hex

2012-08-02 Thread Dr. Stephen Henson
On Thu, Aug 02, 2012, MITSUNARI Shigeo wrote:

> Hi,
> I tried to use openssl command to generate an HMAC with a key
> contains '\0', but failed.
> 
> >openssl dgst -sha1 -hmac `cat ` 
> 
> I'm happy if dgst command supports binary format like enc command.
> So I appended -hmachex  option as the followings:
> 
> >openssl dgst -sha1 -hmachex aabbcc0011223344 
> How about this patch?
> 

You can achieve this using the generalised MAC interface to HMAC like this:

openssl dgst -sha1 -mac HMAC -macopt hexkey:aabbcc

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org