Hi,
 
To generate an HMAC key using SHA-256, I can issue the following
command:
 
openssl dgst -sha256 -hmac <key> -binary < message.bin > mac.bin
 
I realised (eventually!) that the key is not supplied as a hex string
(0a0b34e5.. etc.) but in a binary format.  Obviously this leads to some
fairly unpleasant command lines when the key contains non-printable
characters.
 
Can anybody comment on whether this is likely to cause problems for
Windows or Linux?  Looking at the source code, there doesn't appear to
be any other mechanism for passing the key via the command line.
 
I'm using the FIPS 1.2 flavour of OpenSSL.
 
Many thanks,
 
 
Alistair.


Please help Logica to respect the environment by not printing this email  /  
Merci d'aider Logica à préserver l'environnement en évitant d'imprimer ce mail 
/  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei 
die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o ambiente não 
imprimindo este correio electrónico.



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Reply via email to