本文整理汇总了Java中org.bouncycastle.crypto.DSA类的典型用法代码示例。如果您正苦于以下问题:Java DSA类的具体用法?Java DSA怎么用?Java DSA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DSA类属于org.bouncycastle.crypto包,在下文中一共展示了DSA类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doTestHMACDetECDSA
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
private void doTestHMACDetECDSA(DSA detSigner, Digest digest, byte[] data, CipherParameters privKey, BigInteger r, BigInteger s)
{
byte[] m = new byte[digest.getDigestSize()];
digest.update(data, 0, data.length);
digest.doFinal(m, 0);
detSigner.init(true, privKey);
BigInteger[] rs = detSigner.generateSignature(m);
if (!r.equals(rs[0]))
{
fail("r value wrong");
}
if (!s.equals(rs[1]))
{
fail("s value wrong");
}
}
示例2: DSADigestSigner
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
public DSADigestSigner(
DSA signer,
Digest digest)
{
this.digest = digest;
this.dsaSigner = signer;
}
示例3: DSASigner
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSASigner(
Digest digest,
DSA signer)
{
this.digest = digest;
this.signer = signer;
}
示例4: DSABase
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSABase(
Digest digest,
DSA signer,
DSAEncoder encoder)
{
this.digest = digest;
this.signer = signer;
this.encoder = encoder;
}
示例5: JDKDSASigner
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected JDKDSASigner(
String name,
Digest digest,
DSA signer)
{
super(name);
this.digest = digest;
this.signer = signer;
}
示例6: DSABase
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSABase(
String name,
Digest digest,
DSA signer,
DSAEncoder encoder)
{
super(name);
this.digest = digest;
this.signer = signer;
this.encoder = encoder;
}
示例7: DSASigner
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSASigner(
Digest digest,
DSA signer)
{
super("DSA");
this.digest = digest;
this.signer = signer;
}
示例8: createDSAImpl
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSA createDSAImpl()
{
return new ECDSASigner();
}
示例9: createDSAImpl
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSA createDSAImpl()
{
return new DSASigner();
}
示例10: SignatureSpi
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
SignatureSpi(Digest digest, DSA signer, DSAEncoder encoder)
{
super(digest, signer, encoder);
}
示例11: DSAPlainDigestSigner
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
public DSAPlainDigestSigner(DSA signer, Digest digest) {
this.digest = digest;
this.dsaSigner = signer;
}
示例12: createDSAImpl
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSA createDSAImpl(short hashAlgorithm)
{
return new ECDSASigner(new HMacDSAKCalculator(TlsUtils.createHash(hashAlgorithm)));
}
示例13: createDSAImpl
import org.bouncycastle.crypto.DSA; //导入依赖的package包/类
protected DSA createDSAImpl(short hashAlgorithm)
{
return new DSASigner(new HMacDSAKCalculator(TlsUtils.createHash(hashAlgorithm)));
}