com.fitbur.bouncycastle.crypto.tls.TlsECDSASigner 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.ECPublicKeyParameters;
import com.fitbur.bouncycastle.crypto.signers.ECDSASigner;
import com.fitbur.bouncycastle.crypto.signers.HMacDSAKCalculator;
public class TlsECDSASigner
extends TlsDSASigner
{
public boolean isValidPublicKey(AsymmetricKeyParameter publicKey)
{
return publicKey instanceof ECPublicKeyParameters;
}
protected DSA createDSAImpl(short hashAlgorithm)
{
return new ECDSASigner(new HMacDSAKCalculator(TlsUtils.createHash(hashAlgorithm)));
}
protected short getSignatureAlgorithm()
{
return SignatureAlgorithm.ecdsa;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy