At 06:39 PM 11/3/00 +0100, Luis wrote:
>I need to make some operations on a text string, so I thougth to use the
>BN library.
>
>The problem I found was when I tried BN_bin2bn to obtain a BN from a text
>string, but when I use this BN on a multiplication I`ve got an error.
>
>Could you help me to codify a text string as a BN?. Thanks in advanced.
BN_bin2bn doesn't do what you think it does.
'bin2bn' is short for 'binary to big number'. The input is a
series of unsigned bytes. The output is a 'big number'
(arbitrary bit-width integer) used for all calculations.
I don't know what format your text string is in. If it is a series
of bytes represented in hexadecimal, you would want to use
some sort of 'hex2bin' conversion routine before calling
BN_bin2bn. If your text is BASE64, there are already
conversion routines in the OpenSSL library to handle that.
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
Tom Biggs
'89 FJ1200 DoD #1146
"The whole aim of practical politics is to keep the populace alarmed -
and hence clamorous to be led to safety - by menacing it with an endless
series of hobgoblins, all of them imaginary." -- H.L. Mencken
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]