Package net.messagevortex.asn1
Class CipherSpec
java.lang.Object
net.messagevortex.asn1.AbstractBlock
net.messagevortex.asn1.CipherSpec
- All Implemented Interfaces:
Serializable,Block,Dumpable
Represents a the Blending specification of the cipher specification including usage.
- See Also:
-
Field Summary
FieldsFields inherited from class net.messagevortex.asn1.AbstractBlock
CRLF -
Constructor Summary
ConstructorsConstructorDescriptionCipherSpec(CipherUsage cipherUsage) CipherSpec(org.bouncycastle.asn1.ASN1Encodable to) Create object from ASN.1 code. -
Method Summary
Modifier and TypeMethodDescriptiondumpValueNotation(String prefix, DumpType dumpType) booleaninthashCode()protected final voidparse(org.bouncycastle.asn1.ASN1Encodable to) Sets the specification for an asymmetric key.setCipherUsage(CipherUsage usage) Sets the usage type for the cypher specified in this set.setMacSpec(MacAlgorithmSpec spec) Sets the specification for an mac algorithm.Sets the specification for an symmetric key.org.bouncycastle.asn1.ASN1ObjecttoAsn1Object(DumpType dumpType) Dumps an ASN.1 representation of the object.Methods inherited from class net.messagevortex.asn1.AbstractBlock
fromBase64, fromHex, parse, prepareDump, toBase64, toBitString, toBytes, toDer, toHex
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
CipherSpec
Create object from ASN.1 code.
- Parameters:
to- the ASN.1 code- Throws:
IOException- if parsing of ASN.1 code fails
-
CipherSpec
-
-
Method Details
-
parse
- Specified by:
parsein classAbstractBlock- Throws:
IOException
-
getAsymmetricSpec
-
setAsymmetricSpec
Sets the specification for an asymmetric key.
- Parameters:
spec- the specification to be set- Returns:
- the previously set specification
-
getSymmetricSpec
-
setSymmetricSpec
Sets the specification for an symmetric key.
- Parameters:
spec- the specification to be set- Returns:
- the previously set specification
-
getMacSpec
-
setMacSpec
Sets the specification for an mac algorithm.
- Parameters:
spec- the specification to be set- Returns:
- the previously set specification
-
getCipherUsage
-
setCipherUsage
Sets the usage type for the cypher specified in this set.
- Parameters:
usage- the usage to be set- Returns:
- the previously set usage
-
dumpValueNotation
- Specified by:
dumpValueNotationin interfaceBlock- Throws:
IOException
-
toAsn1Object
Description copied from interface:DumpableDumps an ASN.1 representation of the object.
- Specified by:
toAsn1Objectin interfaceDumpable- Parameters:
dumpType- the dump type to be used- Returns:
- the ASN.1 string representation of the object
- Throws:
IOException- if dumping of the object fails due to an illegal internal state of the object
-
equals
-
hashCode
public int hashCode()
-