|
Boost Users : |
Subject: Re: [Boost-users] Base16, 32, 64 Encoding / Decoding
From: Jeff Dunlap (jeff_j_dunlap_at_[hidden])
Date: 2008-12-19 18:05:57
"Graham Bull" <calzakk_at_[hidden]> wrote in message news:c1ebcf460812190628p642b6c84g354510283bb43c23_at_mail.gmail.com...
> You need to use the Base??EncodeGetLength() functions first,
> allocate a buffer of the required size, then use the Base??Encode()
> function:
> const char* source = "...";
> unsigned long sourceSize = strlen( source );
> unsigned long size = Base32EncodeGetLength( sourceSize );
> char* dest = new char[ size+1 ]; //+1 for null terminator
> Base32Encode( dest, source, sourceSize );
Graham, thank you for helping me with this, works great!
Best Regards,
Jeff
-- ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net