Package org.apache.synapse.securevault

# Class SymmetricCipher

java.lang.Object
org.apache.synapse.securevault.BaseCipher
org.apache.synapse.securevault.SymmetricCipher

All Implemented Interfaces:
  `DecryptionProvider`, `EncryptionProvider`

public class SymmetricCipher extends BaseCipher
The Cipher doing symmetric cryptographic operations Uses default key when these is no SecretKey

- ## Field Summary

  ### Fields inherited from class org.apache.synapse.securevault.BaseCipher

  `keyStoreWrapper`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SymmetricCipher(CipherInformation cipherInformation, Key key)`
  `SymmetricCipher(CipherInformation cipherInformation, KeyStoreInformation keystoreInformation)`
  `SymmetricCipher(CipherInformation cipherInformation, KeyStoreWrapper keyStoreWrapper)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Key`
  `getKey(CipherOperationMode operationMode)`
  Returns the correct key for correct operation

  ### Methods inherited from class org.apache.synapse.securevault.BaseCipher

  `decrypt, encrypt, getCipherInformation, getKeyStoreInformation`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SymmetricCipher

    public SymmetricCipher(CipherInformation cipherInformation, KeyStoreInformation keystoreInformation)

  - ### SymmetricCipher

    public SymmetricCipher(CipherInformation cipherInformation, KeyStoreWrapper keyStoreWrapper)

  - ### SymmetricCipher

    public SymmetricCipher(CipherInformation cipherInformation, Key key)

- ## Method Details

  - ### getKey

    public Key getKey(CipherOperationMode operationMode)
    Description copied from class: `BaseCipher`
    Returns the correct key for correct operation
    Specified by:
      `getKey` in class `BaseCipher`
    Parameters:
      `operationMode` - Ciper operation
    Returns:
      A key