com.fitbur.bouncycastle.crypto.tls.TlsDSSSigner Maven / Gradle / Ivy
package com.fitbur.bouncycastle.crypto.tls;
import com.fitbur.bouncycastle.crypto.DSA;
import com.fitbur.bouncycastle.crypto.params.AsymmetricKeyParameter;
import com.fitbur.bouncycastle.crypto.params.DSAPublicKeyParameters;
import com.fitbur.bouncycastle.crypto.signers.DSASigner;
import com.fitbur.bouncycastle.crypto.signers.HMacDSAKCalculator;
public class TlsDSSSigner
extends TlsDSASigner
{
public boolean isValidPublicKey(AsymmetricKeyParameter publicKey)
{
return publicKey instanceof DSAPublicKeyParameters;
}
protected DSA createDSAImpl(short hashAlgorithm)
{
return new DSASigner(new HMacDSAKCalculator(TlsUtils.createHash(hashAlgorithm)));
}
protected short getSignatureAlgorithm()
{
return SignatureAlgorithm.dsa;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy