Package oracle.nosql.driver.iam.pki
Class Pem.Encryption.Builder
java.lang.Object
oracle.nosql.driver.iam.pki.Pem.Encryption.Builder
- Enclosing class:
- Pem.Encryption
Build
Pem.Encryption instances-
Method Summary
Modifier and TypeMethodDescriptionThe block mode, defaults toCBCbuild()Build thePem.Encryptioninstance.entropy(SecureRandom entropy) Configure the entropy source to use for generating an initialization vector, if none explicitly specifiediv(byte[] iv) The initialization vectorkeySize(int keySize) The encryption key-size in bits, defaults to 128ownsPassphrase(boolean ownsPassphrase) Indicate if this instance owns the passphrase (and therefore must close/erase it, when this instance is closed)passphrase(char[] passphrase) Configure the passphrase from a character array.passphrase(Pem.Passphrase passphrase) The pass phrase
-
Method Details
-
keySize
The encryption key-size in bits, defaults to 128- Parameters:
keySize- The key size in bits- Returns:
- self
-
entropy
Configure the entropy source to use for generating an initialization vector, if none explicitly specified- Parameters:
entropy- The source of random bytes- Returns:
- self
-
iv
The initialization vector- Parameters:
iv- The initialization vector- Returns:
- self
-
blockMode
The block mode, defaults toCBC- Parameters:
blockMode- The block mode- Returns:
- self
-
passphrase
The pass phrase- Parameters:
passphrase- The passphrase- Returns:
- self
-
ownsPassphrase
Indicate if this instance owns the passphrase (and therefore must close/erase it, when this instance is closed)- Parameters:
ownsPassphrase- If true the instance will own the passphrase- Returns:
- self
-
passphrase
Configure the passphrase from a character array. The passphrase will be erased when thePem.Encryptioninstance is closed- Parameters:
passphrase- The pass phrase- Returns:
- self
-
build
Build thePem.Encryptioninstance. If an initialization vector has not been configured, then a random one is automatically generated- Returns:
- Encryption instance
-