* Chuck Pareto wrote on Mon, May 24, 2010 at 16:12 -0700: > Hi, > When I run openssl rsa to display my public key info. I see this > below. How do I convert this output to a byte array? What is this > output? Is it ascii or base64?
it's ASCII and in the Mail potentially base64... :) surely it is a list of hex values for the bytes (a "hex dump") in which language? Simplest is perl, use something like: perl -e 'my $ahex = $ARGV[0] || jn("", <>);chomp $ahex;$ahex =~ tr|0-9A-Fa-f||cd;print pack("H*", $ahex);' and feed via STDIN and get binary via STDOUT. Often also it can be helpful to use such a small perl script to generate source code when someone wants to embed test keys in source code, for example certificates to be included in unit tests or have a small parser in the target language that takes the output of the tool as input to ease maintenance. I think there is a standard tool to convert binary data to C code, but I cannot find it. Maybe `od' is a starting point for an own construction. oki, Steffen -[end of message]-------------------------------------------------->8======= About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,850 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org