(Answer) (Category) Crypto++ Faq-O-Matic :
How do I use a stream cipher?
Moderator: weidai (inherited from parent)
Stream ciphers implement the SymmetricCipher interface, which is documented at http://www.cryptopp.com/docs/ref/struct_symmetric_cipher_documentation.html. The following example uses the Sosemanuk stream cipher:
        byte plaintext[100], ciphertext[100], key[Sosemanuk::DEFAULT_KEYLENGTH], iv[Sosemanuk::IV_LENGTH];
        // put data into key, iv, and plaintext here
        // encrypt
        Sosemanuk::Encryption enc(key, Sosemanuk::DEFAULT_KEYLENGTH, iv);
        enc.ProcessData(ciphertext, plaintext, 100);
        // now decrypt
        Sosemanuk::Decryption dec(key, Sosemanuk::DEFAULT_KEYLENGTH, iv);
        dec.ProcessData(plaintext, ciphertext, 100);

2007-Aug-16 5:11pm weidai
[Append to This Answer]
2007-Aug-16 5:11pm
Previous: (Answer) How do I use a block cipher in Crypto++ 5.x?
Next: (Answer) How do I use a hash function?
This document is: http://www.cryptopp.com/cgi-bin/fom.cgi?file=30
[Search] [Appearance] [Show Expert Edit Commands]
This is a Faq-O-Matic 2.721.
This FAQ is administered by Wei Dai.