public class SIG0Signer
extends java.lang.Object
Constructor and Description |
---|
SIG0Signer(int algorithm,
java.security.PrivateKey privateKey,
Name name,
int keyFootprint)
Creates a new SIG(0) signer object.
|
SIG0Signer(int algorithm,
java.security.PrivateKey privateKey,
Name name,
java.security.PublicKey publicKey)
Creates a new SIG(0) signer object.
|
public SIG0Signer(int algorithm, java.security.PrivateKey privateKey, Name name, int keyFootprint)
algorithm
- usually DNSSEC.RSAMD5, DNSSEC.DSA, or DNSSEC.RSASHA1privateKey
- signing key (must match algorithm)name
- the name of the keykeyFootprint
- the key tagpublic SIG0Signer(int algorithm, java.security.PrivateKey privateKey, Name name, java.security.PublicKey publicKey)
public void apply(Message m, byte[] old) throws java.io.IOException, java.security.SignatureException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException
m
- the messageold
- if this message is a response, the original messagejava.io.IOException
java.security.SignatureException
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException