Actually, you've already used one. StringSource (and FileSource) is the beginning of a filter chain, and StringSink (and FileSink) is the end of one. Now all we have to do is figure out what to put in the middle....
You're probably running on a Linux (or *nix) system, aren't you? If so, you probably don't have something compatible with Microsoft Messenger.... if you do, reply directly to my email address and I'll sign in with Messenger. So I guess I'll have to drop back and punt.... like I said, I don't use filters, didn't want to spend the time it takes to figure them all out... One place to start is: http://www.weidai.com/scan-mirror/mac.html#HMAC And then we try modifying your original encryption filter.... ******** have to initialize cipher aes_encrypt here ***************** ******** and declare / open the output file ciphertextfile *********** ******** as before, input is in string plaintext ***************** StringSource source (plaintext, true, new StreamTransformationFilter( aes_encrypt, new Base64Encoder (new FileSink (ciphertextfile)))); This should get you an encoded encrypted string written to the file "ciphertextfile". This is off the top of my head, so there might be something that needs to be changed... Now all we have to do is figure out how to get the MAC appended to the ciphertext before it goes to the base64 encoder... Whoa, now that I think about it, I realize that you're talking about encrypting strings to your own filesystem.... I was thinking about encrypting to be sent out, like over the Internet. Maybe you don't need a MAC for this... You might post a question to the mailing list and / or a question to the sci.crypt newsgroup (there are some really good cryptologists there), then we get back together if they say the MAC is needed in this case... There's more help with Crypto++ here: http://cryptopp.sourceforge.net/docs/ref5/ and here: http://www.eskimo.com/~weidai/cgi-bin/fom-serve/cache/1.html I'm not quitting here, just pausing to make sure of where we are and where we're going. Rickey [EMAIL PROTECTED]
