public class MacAlgorithm extends AbstractBlock implements Serializable
Represents a Mac Algorithm as ASN.1 structure.
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
CRLF
Constructor and Description |
---|
MacAlgorithm() |
MacAlgorithm(Algorithm a)
constructor 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.
|
Modifier and Type | Method and Description |
---|---|
String |
dumpValueNotation(String prefix,
DumpType dumpType) |
Algorithm |
getAlgorithm() |
protected void |
parse(org.bouncycastle.asn1.ASN1Encodable to) |
Algorithm |
setAlgorithm(Algorithm alg)
Sets the algorithm.
|
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 MacAlgorithm()
public MacAlgorithm(org.bouncycastle.asn1.ASN1Encodable to) throws IOException
constructor to creates a mac algorith from an ASN.1 encoded object.
to
- the object description in ASN.1 notationIOException
- if an error occures during parsingNullPointerException
- if object is nullpublic MacAlgorithm(Algorithm a) throws IOException
constructor to creates a mac algorith from an ASN.1 encoded object.
a
- the object description in ASN.1 notationIOException
- if an error occures during parsingNullPointerException
- if object is nullprotected final void parse(org.bouncycastle.asn1.ASN1Encodable to) throws IOException
parse
in class AbstractBlock
IOException
public org.bouncycastle.asn1.ASN1Object toAsn1Object(DumpType dumpType)
Dumpable
Dumps an ASN.1 representation of the object.
toAsn1Object
in interface Dumpable
dumpType
- the dump type to be usedpublic String dumpValueNotation(String prefix, DumpType dumpType)
dumpValueNotation
in interface Block
public Algorithm setAlgorithm(Algorithm alg) throws IOException
Sets the algorithm.
alg
- the algorithm to be usedIOException
- if algorithm is not of the correct typepublic Algorithm getAlgorithm()
Copyright © 2023. All rights reserved.