[Botan-devel] Tutorial compile error

Kang Chung the_logician at spray.se
Fri Dec 2 03:42:39 EST 2005


Thanks for the quick reply!
It seems that a new problem has arised.
The compiler doesn't seem to recognize the member ".to_bits()".
When looking into the symkey.h, i found a public "bits_of()" member of the OctetString.
Is that the one you wanted?

/Kang Chung
	


> Från: Jack Lloyd <lloyd at randombit.net>
> Till: botan-devel at randombit.net
> Rubrik: Re: [Botan-devel] Tutorial compile error
> Datum: Thu, 1 Dec 2005 12:14:21 -0500

> Oops; there was a change made starting around 1.4.0 that broke this
> example. It's been a while since I updated the tutorial.
> 
> It used to be the case that there was an implicit conversion from
> OctetString
> to a byte array. That is no longer the case, instead you have to call
> OctetString's to_bits() member function on that effect. So the example
> should
> have:
> 
> SecureVector<byte> key_and_IV = s2k->derive_key(32, passphrase).to_bits();
> 
> I'll try to find the time to update the tutorial and make sure everything
> else
> still works before the next release. Thank you for pointing this out.
> 
> -Jack
> 
> On Thu, Dec 01, 2005 at 05:03:04PM +0000, Kang Chung wrote:
> > Hello
> > 
> > I'm trying to follow the tutorial document to understand how the API
> works.
> > But i've come across a compilation error when running the code in section
> 3.1.3.
> > 
> > SecureVector<byte> key_and_IV = s2k->derive_key(32, passphrase);
> > 
> > The error message is:
> > conversion from 'Botan::OctetString' to non-scalar type
> 'Botan::SecureVector<botan::byte>' requested
> > 
> > Am i doing something wrong or is there a misprint in the tutorial?
> > 
> > Thanks
> > 
> > /Kang Chung
> > _______________________________________________
> > botan-devel mailing list
> > botan-devel at randombit.net
> > <a
> href=http://www.randombit.net/mailman/listinfo/botan-devel>http://www.random
> bit.net/mailman/listinfo/botan-devel</a>
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> <a
> href=http://www.randombit.net/mailman/listinfo/botan-devel>http://www.random
> bit.net/mailman/listinfo/botan-devel</a>


More information about the botan-devel mailing list