public class PBMacAlgID extends AlgorithmIdentifier
PasswordBasedMAC
.Constructor and Description |
---|
PBMacAlgID()
Creates a new
PBMacAlgID instance. |
PBMacAlgID(ASN1Object params)
Creates a new
PBMacAlgID instance with the given parameters. |
PBMacAlgID(byte[] salt, AlgorithmIdentifier owf, java.math.BigInteger count, AlgorithmIdentifier mac)
Creates a new
PBMacAlgID instance with the given parameters. |
PBMacAlgID(java.io.InputStream is)
Creates a new
PBMacAlgID instance by reading its encoding from the given stream. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a deep copy of this
PBMacID object. |
java.math.BigInteger |
getCount()
Returns the password-based key derivation iteration count.
|
AlgorithmIdentifier |
getMacAlgID()
Returns the keyd MAC function to be used for the password-based MAC.
|
AlgorithmIdentifier |
getOwfAlgID()
Returns the password-based key derivation one-way (hash) function.
|
byte[] |
getSalt()
Returns the password-based key derivation salt.
|
void |
input(java.io.InputStream is)
Reads in a
PBMacID object from the given input stream. |
equals, getOID, getParameters, hashCode, length, output, readExternal, toString, writeExternal
public PBMacAlgID()
PBMacAlgID
instance.public PBMacAlgID(byte[] salt, AlgorithmIdentifier owf, java.math.BigInteger count, AlgorithmIdentifier mac) throws AlgorithmIdentifierException
PBMacAlgID
instance with the given parameters.salt
- The password-based encryption key derivation salt.owf
- The password-based key derivation one-way (hash) function.count
- The password-based key derivation iteration count.mac
- The keyed MAC algorithm to be used with the password-based key.AlgorithmIdentifierException
- If an error occurs processing the parameters.public PBMacAlgID(ASN1Object params) throws AlgorithmIdentifierException
PBMacAlgID
instance with the given parameters.AlgorithmIdentifierException
- If an error occurs processing the parameters.public PBMacAlgID(java.io.InputStream is) throws java.io.IOException
PBMacAlgID
instance by reading its encoding from the given stream.java.io.IOException
- If an error occurs reading from the stream.public byte[] getSalt()
null
if none are present.public AlgorithmIdentifier getOwfAlgID()
null
if none is present.public java.math.BigInteger getCount()
null
if none is present.public AlgorithmIdentifier getMacAlgID()
null
if none is present.public java.lang.Object clone()
PBMacID
object.clone
in class AlgorithmIdentifier
public void input(java.io.InputStream is) throws java.io.IOException
PBMacID
object from the given input stream.input
in interface Streamable
input
in class AlgorithmIdentifier
is
- The input stream.java.io.IOException
- If an I/O error occurs.