[Botan-devel] Tutorial compile error

Jack Lloyd lloyd at randombit.net
Thu Dec 1 12:14:21 EST 2005


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
> http://www.randombit.net/mailman/listinfo/botan-devel




More information about the botan-devel mailing list