Concept Classes

The java.security and javax.crypto packages have classes and interfaces that represent the cryptographic concepts that were introduced in Chapter 2. Table 3.2 summarizes the cryptographic concepts represented in the classes included in JDK 1.2 and JCE 1.2.

Table 3-2. Cryptographic Concept Classes

Class or Interface

Description

java.security.cert.Certificate

A cryptographic certificate

javax.crypto.Cipher

A cipher

java.security.Key ,java.security.PrivateKey ,java.security.PublicKey ,javax.crypto.SecretKey

A key, used for signing or encryption

javax.crypto.KeyAgreement

A secret key exchange protocol

java.security.KeyFactory

Translates public and private keys from one format to another

javax.crypto.KeyGenerator

Creates keys for symmetric ciphers

java.security.KeyPairGenerator

Creates pairs of public and private keys for signing or encryption

javax.crypto.Mac

A Message Authentication Code (MAC)

java.security.MessageDigest

A cryptographic hash function

javax.crypto.SecretKeyFactory

Translates secret keys from one format to another

java.security.SecureRandom

A cryptographically strong random number engine

java.security.Signature

A digital signature

Get Java Cryptography 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.