• Implementation methods for encryption and decryption
  1. Symmetric Key Generation

2. Encryption

3. Decryption

SecretKeys and KeyGenerator

  • SecretKeys are used in symmetric encryption algorithms and use the same keys for the encryption and decryption process
  • KeyGenerator class creates the SecretKeys objects used by cipher for encryption and decryption
  • KeyGenerator class (javax.crypto.KeyGenerator) ; is used to create SecretKeys
    – SecretKey myKey = keyGen.generateKey();