Class CipherInitializer

java.lang.Object
org.wso2.carbon.mediation.security.vault.CipherInitializer

public class CipherInitializer extends Object
  • Method Details

    • getInstance

      public static CipherInitializer getInstance()
    • initCipherDecryptProvider

      protected void initCipherDecryptProvider()
    • isKeyBasedSymmetricEncryption

      public boolean isKeyBasedSymmetricEncryption(String secretRepositoryEncryptionMode)
      Checks whether symmetric encryption is configured using the provided encryption mode.
    • initEncrypt

      public void initEncrypt()
      Initializing the encryption key store which uses to encrypt the given plain text
    • handleException

      protected static void handleException(String msg, Exception e)
    • handleException

      protected static void handleException(String msg)
    • getIdentityKeyStoreWrapper

      public org.wso2.securevault.keystore.IdentityKeyStoreWrapper getIdentityKeyStoreWrapper()
    • setIdentityKeyStoreWrapper

      public void setIdentityKeyStoreWrapper(org.wso2.securevault.keystore.IdentityKeyStoreWrapper identityKeyStoreWrapper)
    • getEncryptionKeyWrapper

      public org.wso2.securevault.encryption.EncryptionKeyWrapper getEncryptionKeyWrapper()
    • setEncryptionKeyWrapper

      public void setEncryptionKeyWrapper(org.wso2.securevault.encryption.EncryptionKeyWrapper encryptionKeyWrapper)
    • getTrustKeyStoreWrapper

      public org.wso2.securevault.keystore.TrustKeyStoreWrapper getTrustKeyStoreWrapper()
    • setTrustKeyStoreWrapper

      public void setTrustKeyStoreWrapper(org.wso2.securevault.keystore.TrustKeyStoreWrapper trustKeyStoreWrapper)
    • getDecryptionProvider

      public org.wso2.securevault.DecryptionProvider getDecryptionProvider()
    • getEncryptionProvider

      public Cipher getEncryptionProvider()
    • getAlgorithm

      public String getAlgorithm()
    • getInitializationVector

      public byte[] getInitializationVector()
    • getGCMEncryptionProvider

      public CipherInitializer.CipherWithIV getGCMEncryptionProvider()
      Gets an encryption provider for GCM mode with a new IV. This method should be called for each GCM encryption operation to ensure that a unique key-IV combination is used, which is required for GCM security.
      Returns:
      A CipherWithIV instance containing both the Cipher and its corresponding IV