|
So calling Integer::DEREncode(bf)
will be enough? How to aply hashing on bf which is a BufferedTransformation
object?
----- Original Message -----
Sent: Thursday, 17 July, 2003 06:55
ب.ظ
Subject: Re: Integer to byte*
Well, there is a slight disconnect between Integer and an array
of octets. This stems from the multitude of ways they can be
represented. If you want a byte of the n-bit Integer then you can
get one (given normal byte boundaries) with GetByte(). You can also
get the ASN.1 encoding on an Integer, which is a stream of octets with a
header explaining how long it is, and that it is an
Integer.
Normally a definitive format like DEREncoding to ASN.1 then
hashing is a good way of doing this. It eliminates ordering and
other problems that can crop up.
73, Shawn
Sarah Rastkar
wrote:
> Hello! > Is there any special function to transform
an "Integer" to "byte*" and > vice versa? Or maybe simple casting is
enough. I need these functions to > perform hashing on
Integers. > Wishes, > Sarah > > >
>
|