[Botan-devel] Converting SecureVector<byte> to string
Z. S. O.
tiredashell at gmail.com
Sat Mar 28 15:07:06 EDT 2009
That seems to work well, but it's not clear to me how to go the other
direction (string to SecureVector<byte>) since a byte is smaller than a char
so the compiler keeps yelling at me for losing precision.
On Fri, Mar 27, 2009 at 8:50 PM, Jack Lloyd <lloyd at randombit.net> wrote:
> On Fri, Mar 27, 2009 at 05:33:39PM -0400, Z. S. O. wrote:
> > My current method of converting a SecureVector<byte> to a string is put
> > in a pipe with the Base64_Encoder filter. To go the other direction, I
> > it with Base64_Decoder. I've decided, however, that I don't want to
> > it in any readable format; I'd like the raw binary data. Is there a
> > way to do this?
> All you should need for this is
> std::string s(reinterpret_cast<const char*>(memvec.begin()),
> botan-devel mailing list
> botan-devel at randombit.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the botan-devel