Class CipherInitializer
java.lang.Object
org.wso2.carbon.mediation.security.vault.CipherInitializer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWrapper class to atomically pair a Cipher with its corresponding IV. -
Method Summary
Modifier and TypeMethodDescriptionorg.wso2.securevault.DecryptionProviderorg.wso2.securevault.encryption.EncryptionKeyWrapperGets an encryption provider for GCM mode with a new IV.org.wso2.securevault.keystore.IdentityKeyStoreWrapperbyte[]static CipherInitializerorg.wso2.securevault.keystore.TrustKeyStoreWrapperprotected static voidhandleException(String msg) protected static voidhandleException(String msg, Exception e) protected voidvoidInitializing the encryption key store which uses to encrypt the given plain textbooleanisKeyBasedSymmetricEncryption(String secretRepositoryEncryptionMode) Checks whether symmetric encryption is configured using the provided encryption mode.voidsetEncryptionKeyWrapper(org.wso2.securevault.encryption.EncryptionKeyWrapper encryptionKeyWrapper) voidsetIdentityKeyStoreWrapper(org.wso2.securevault.keystore.IdentityKeyStoreWrapper identityKeyStoreWrapper) voidsetTrustKeyStoreWrapper(org.wso2.securevault.keystore.TrustKeyStoreWrapper trustKeyStoreWrapper)
-
Method Details
-
getInstance
-
initCipherDecryptProvider
protected void initCipherDecryptProvider() -
isKeyBasedSymmetricEncryption
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
-
handleException
-
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
-
getAlgorithm
-
getInitializationVector
public byte[] getInitializationVector() -
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
-