1. A method for encrypting data, comprising the steps of: reading a plaintext data block from a memory; storing the plaintext data block in an input buffer; encrypting the plaintext data block in the input buffer using a first mode to generate a first ciphertext; storing the first ciphertext in an output buffer; and encrypting the plaintext data block in the input buffer using a second mode to generate a second ciphertext.