public class BufferedBlockCipherSpec extends java.lang.Object implements Spec<org.bouncycastle.crypto.BufferedBlockCipher>
newInstance() method.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
algorithm
Cipher algorithm algorithm.
|
static java.util.regex.Pattern |
FORMAT
String specification format,
algorithm/mode/padding. |
private java.lang.String |
mode
Cipher mode, e.g.
|
private java.lang.String |
padding
Cipher padding scheme, e.g.
|
| Constructor and Description |
|---|
BufferedBlockCipherSpec(java.lang.String algName)
Creates a new instance from an algorithm name.
|
BufferedBlockCipherSpec(java.lang.String algName,
java.lang.String cipherMode)
Creates a new instance from a cipher algorithm and mode.
|
BufferedBlockCipherSpec(java.lang.String algName,
java.lang.String cipherMode,
java.lang.String cipherPadding)
Creates a new instance from the given cipher specifications.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithm() |
BlockCipherSpec |
getBlockCipherSpec()
Gets the simple block cipher specification corresponding to this instance.
|
java.lang.String |
getMode()
Gets the cipher mode.
|
java.lang.String |
getPadding()
Gets the cipher padding scheme.
|
private static org.bouncycastle.crypto.paddings.BlockCipherPadding |
getPadding(java.lang.String padding)
Gets a instance of block cipher padding from a padding name string.
|
org.bouncycastle.crypto.BufferedBlockCipher |
newInstance()
Creates a new buffered block cipher from the specification in this instance.
|
static BufferedBlockCipherSpec |
parse(java.lang.String specification)
Parses a string representation of a buffered block cipher specification into an instance of this class.
|
java.lang.String |
toString() |
public static final java.util.regex.Pattern FORMAT
algorithm/mode/padding.private final java.lang.String algorithm
private final java.lang.String mode
private final java.lang.String padding
public BufferedBlockCipherSpec(java.lang.String algName)
algName - Cipher algorithm name.public BufferedBlockCipherSpec(java.lang.String algName,
java.lang.String cipherMode)
algName - Cipher algorithm name.cipherMode - Cipher mode.public BufferedBlockCipherSpec(java.lang.String algName,
java.lang.String cipherMode,
java.lang.String cipherPadding)
algName - Cipher algorithm name.cipherMode - Cipher mode.cipherPadding - Cipher padding scheme algorithm.public java.lang.String getAlgorithm()
getAlgorithm in interface Spec<org.bouncycastle.crypto.BufferedBlockCipher>public java.lang.String getMode()
public java.lang.String getPadding()
public BlockCipherSpec getBlockCipherSpec()
public org.bouncycastle.crypto.BufferedBlockCipher newInstance()
newInstance in interface Spec<org.bouncycastle.crypto.BufferedBlockCipher>public java.lang.String toString()
toString in class java.lang.Objectpublic static BufferedBlockCipherSpec parse(java.lang.String specification)
specification - Block cipher specification of the form algorithm/mode/padding.private static org.bouncycastle.crypto.paddings.BlockCipherPadding getPadding(java.lang.String padding)
padding - Name of padding algorithm.