10.5. Additional Cryptography Classes

This section describes the design and usage of Java Cryptography Extension classes, which are now integrated with the rest of the Java Cryptography Architecture classes in the Java 2 SDK 1.4.

10.5.1. Cipher

The javax.crypto.Cipher class provides the functionality of a cryptographic cipher used for encryption and decryption. This class forms the core of the JCE framework.

Creating a Cipher Object

As with all engine classes, a Cipher object is created by calling one of the getInstance static factory methods on the Cipher class. To create a Cipher object, you must specify the transformation name. You may also specify which provider you want to supply the implementation of the requested transformation:

 public ...

Get Inside Java™ 2 Platform Security: Architecture, API Design, and Implementation, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.