|
Boost Users : |
Subject: Re: [Boost-users] [Serialization] Encrypting an xml archive
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-09-13 03:20:20
Sean Farrow wrote:
> Hi:
> Has anyone had the need to encrypt an xml or binary archive? If so
> what is the best way of going about it? Do I need to create a totally
> new archive class, or can I just derive from another one of boosts
> archive classes, if yes which methods should be overridden?
> Thanks for any pointers
> Regards
> Sean.
the best way is to
a) make an encrypted stream_buf
b) use this to make an encrypted stream - very easy
c) use your encripted stream with the serialization library just like you do
with any other stream
Remember that the archive class just maps types to the underlying stream -
any
stream will do.
Also you could make a new stream with the boost iostreams library. This
would allow you to make an encrypted and compressed stream with no
additional labor.
Robert Ramey.
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