Package com.oracle.bmc.http.client.pki
Class Pem.Encryption.Builder
- java.lang.Object
-
- com.oracle.bmc.http.client.pki.Pem.Encryption.Builder
-
- Enclosing class:
- Pem.Encryption
public static final class Pem.Encryption.Builder extends Object
BuildPem.Encryptioninstances
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pem.Encryption.BuilderblockMode(String blockMode)The block mode, defaults to CBCPem.Encryptionbuild()Build thePem.Encryptioninstance.Pem.Encryption.Builderentropy(SecureRandom entropy)Configure the entropy source to use for generating an initialization vector, if none explicitly specifiedPem.Encryption.Builderiv(byte[] iv)The initialization vectorPem.Encryption.BuilderkeySize(int keySize)The encryption key-size in bits, defaults to 128Pem.Encryption.BuilderownsPassphrase(boolean ownsPassphrase)Indicate if this instance owns the passphrase (and therefore must close/erase it, when this instance is closed)Pem.Encryption.Builderpassphrase(char[] passphrase)Configure the passphrase from a character array.Pem.Encryption.Builderpassphrase(Pem.Passphrase passphrase)The pass phrase
-
-
-
Method Detail
-
keySize
public Pem.Encryption.Builder keySize(int keySize)
The encryption key-size in bits, defaults to 128- Parameters:
keySize- The key size in bits- Returns:
- self
-
entropy
public Pem.Encryption.Builder entropy(SecureRandom 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
public Pem.Encryption.Builder iv(byte[] iv)
The initialization vector- Parameters:
iv- The initialization vector- Returns:
- self
-
blockMode
public Pem.Encryption.Builder blockMode(String blockMode)
The block mode, defaults to CBC- Parameters:
blockMode- The block mode- Returns:
- self
-
passphrase
public Pem.Encryption.Builder passphrase(Pem.Passphrase passphrase)
The pass phrase- Parameters:
passphrase- The passphrase- Returns:
- self
-
ownsPassphrase
public Pem.Encryption.Builder ownsPassphrase(boolean 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
public Pem.Encryption.Builder passphrase(char[] passphrase)
Configure the passphrase from a character array.The passphrase will be erased when the
Pem.Encryptioninstance is closed- Parameters:
passphrase- The pass phrase- Returns:
- self
-
build
public Pem.Encryption build()
Build thePem.Encryptioninstance.If an initialization vector has not been configured, then a random one is automatically generated
- Returns:
- Encryption instance
-
-