Encrypting Data
If you're using JCE's built-in cryptography provider, the only ciphers available to you are symmetric key block ciphers. Recall from Chapter 32, "Introduction to Encryption Techniques," that a symmetric key algorithm uses the same key for encryption and decryption and that a block cipher works on a block of data rather than one byte at a time.
When you deal with block ciphers, there are two additional aspects of the encryption that you must specify in addition to the actual cipher. First, there is the block mode, which can be Electronic Code Book (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB), and Propagating Cipher Block Chaining (PCBC).
ECB mode means that you encrypt each block separately. ...
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.