The IBM PKCS package, com.ibm.security.pkcs5, consists of a single class, PKCS5, which implements the PBKDF1 key derivation function, the PBES1 encryption scheme and the PBMAC1 message authentication code algorithms described in PKCS #5 Version 2.0.
The PKCS5 class provides a simple interface for using the PBES1 password-based encryption scheme defined in PKCS #5 to encrypt and decrypt data. It also allows you to use the PBKDF1 key derivation function defined in the standard to derive a password-based key and to use the PBMAC1 algorithm to generate and verify message authentication codes.
Consult the PKCS5EncryptDecrypt.java file for code samples of how to create and use a PKCS5 object for encryption and decryption using password-based encryption algorithms such as DES or DESede.
Consult the PKCS5Mac.java file for code samples of how to create and use a PKCS5 object for generation and verification of message authentication codes using message digest algorithms such as SHA1 orMD5.
All the sample .java files can be found within
docs\pkcs\pkcssamples.jar
and on a Unix system in
docs/pkcs/pkcssamples.jar.
Within the jar file there is a
src directory containing the source code for the samples.