public class CipherSpec extends AbstractBlock implements Serializable
Represents a the Blending specification of the cipher specification including usage.
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
CRLF
Constructor and Description |
---|
CipherSpec(org.bouncycastle.asn1.ASN1Encodable to)
Create object from ASN.1 code.
|
CipherSpec(CipherUsage cipherUsage) |
Modifier and Type | Method and Description |
---|---|
String |
dumpValueNotation(String prefix,
DumpType dumpType) |
boolean |
equals(Object t) |
AsymmetricAlgorithmSpec |
getAsymmetricSpec() |
CipherUsage |
getCipherUsage() |
MacAlgorithmSpec |
getMacSpec() |
SymmetricAlgorithmSpec |
getSymmetricSpec() |
int |
hashCode() |
protected void |
parse(org.bouncycastle.asn1.ASN1Encodable to) |
AsymmetricAlgorithmSpec |
setAsymmetricSpec(AsymmetricAlgorithmSpec spec)
Sets the specification for an asymmetric key.
|
CipherUsage |
setCipherUsage(CipherUsage usage)
Sets the usage type for the cypher specified in this set.
|
MacAlgorithmSpec |
setMacSpec(MacAlgorithmSpec spec)
Sets the specification for an mac algorithm.
|
SymmetricAlgorithmSpec |
setSymmetricSpec(SymmetricAlgorithmSpec spec)
Sets the specification for an symmetric key.
|
org.bouncycastle.asn1.ASN1Object |
toAsn1Object(DumpType dumpType)
Dumps an ASN.1 representation of the object.
|
fromBase64, fromHex, parse, prepareDump, toBase64, toBitString, toBytes, toDer, toHex
public static final long serialVersionUID
public CipherSpec(org.bouncycastle.asn1.ASN1Encodable to) throws IOException
Create object from ASN.1 code.
to
- the ASN.1 codeIOException
- if parsing of ASN.1 code failspublic CipherSpec(CipherUsage cipherUsage)
protected final void parse(org.bouncycastle.asn1.ASN1Encodable to) throws IOException
parse
in class AbstractBlock
IOException
public AsymmetricAlgorithmSpec getAsymmetricSpec()
public AsymmetricAlgorithmSpec setAsymmetricSpec(AsymmetricAlgorithmSpec spec)
Sets the specification for an asymmetric key.
spec
- the specification to be setpublic SymmetricAlgorithmSpec getSymmetricSpec()
public SymmetricAlgorithmSpec setSymmetricSpec(SymmetricAlgorithmSpec spec)
Sets the specification for an symmetric key.
spec
- the specification to be setpublic MacAlgorithmSpec getMacSpec()
public MacAlgorithmSpec setMacSpec(MacAlgorithmSpec spec)
Sets the specification for an mac algorithm.
spec
- the specification to be setpublic CipherUsage getCipherUsage()
public CipherUsage setCipherUsage(CipherUsage usage)
Sets the usage type for the cypher specified in this set.
usage
- the usage to be setpublic String dumpValueNotation(String prefix, DumpType dumpType) throws IOException
dumpValueNotation
in interface Block
IOException
public org.bouncycastle.asn1.ASN1Object toAsn1Object(DumpType dumpType) throws IOException
Dumpable
Dumps an ASN.1 representation of the object.
toAsn1Object
in interface Dumpable
dumpType
- the dump type to be usedIOException
- if dumping of the object fails due to an illegal internal state of the
objectCopyright © 2023. All rights reserved.