Package net.messagevortex.asn1
Class MacAlgorithm
java.lang.Object
net.messagevortex.asn1.AbstractBlock
net.messagevortex.asn1.MacAlgorithm
- All Implemented Interfaces:
Serializable,Block,Dumpable
Represents a Mac Algorithm as ASN.1 structure.
- See Also:
-
Field Summary
FieldsFields inherited from class net.messagevortex.asn1.AbstractBlock
CRLF -
Constructor Summary
ConstructorsConstructorDescriptionconstructor to creates a mac algorith from an ASN.1 encoded object.MacAlgorithm(org.bouncycastle.asn1.ASN1Encodable to) constructor to creates a mac algorith from an ASN.1 encoded object. -
Method Summary
Modifier and TypeMethodDescriptiondumpValueNotation(String prefix, DumpType dumpType) protected final voidparse(org.bouncycastle.asn1.ASN1Encodable to) setAlgorithm(Algorithm alg) Sets the algorithm.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
-
MacAlgorithm
public MacAlgorithm() -
MacAlgorithm
constructor to creates a mac algorith from an ASN.1 encoded object.
- Parameters:
to- the object description in ASN.1 notation- Throws:
IOException- if an error occures during parsingNullPointerException- if object is null
-
MacAlgorithm
constructor to creates a mac algorith from an ASN.1 encoded object.
- Parameters:
a- the object description in ASN.1 notation- Throws:
IOException- if an error occures during parsingNullPointerException- if object is null
-
-
Method Details
-
parse
- Specified by:
parsein classAbstractBlock- 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
-
dumpValueNotation
- Specified by:
dumpValueNotationin interfaceBlock
-
setAlgorithm
Sets the algorithm.
- Parameters:
alg- the algorithm to be used- Returns:
- the previously set algorithm
- Throws:
IOException- if algorithm is not of the correct type
-
getAlgorithm
-