public noneDSA() { super(new NullDigest(), new org.spongycastle.crypto.signers.DSASigner()); } }
public int doFinal(byte[] out, int outOff) { byte[] res = bOut.toByteArray(); System.arraycopy(res, 0, out, outOff, res.length); reset(); return res.length; }
public noneDSA() { super(new NullDigest(), new org.spongycastle.crypto.signers.DSASigner()); } }
public int doFinal(byte[] out, int outOff) { byte[] res = bOut.toByteArray(); System.arraycopy(res, 0, out, outOff, res.length); reset(); return res.length; }
public ecDSAnone() { super(new NullDigest(), new ECDSASigner(), new StdDSAEncoder()); } }
public ecDSAnone() { super(new NullDigest(), new ECDSASigner(), new StdDSAEncoder()); } }
public noneRSA() { super(new NullDigest(), new PKCS1Encoding(new RSABlindedEngine())); } }
public noneRSA() { super(new NullDigest(), new PKCS1Encoding(new RSABlindedEngine())); } }
public byte[] calculateRawSignature(SecureRandom secureRandom, AsymmetricKeyParameter privateKey, byte[] md5andsha1) throws CryptoException { // Note: Only use the SHA1 part of the hash Signer signer = new DSADigestSigner(createDSAImpl(), new NullDigest()); signer.init(true, new ParametersWithRandom(privateKey, secureRandom)); signer.update(md5andsha1, 16, 20); return signer.generateSignature(); }
public byte[] calculateRawSignature(SecureRandom random, AsymmetricKeyParameter privateKey, byte[] md5andsha1) throws CryptoException { Signer sig = new GenericSigner(new PKCS1Encoding(new RSABlindedEngine()), new NullDigest()); sig.init(true, new ParametersWithRandom(privateKey, random)); sig.update(md5andsha1, 0, md5andsha1.length); return sig.generateSignature(); }
protected Signer makeSigner(SignatureAndHashAlgorithm algorithm, boolean raw, boolean forSigning, CipherParameters cp) { if ((algorithm != null) != TlsUtils.isTLSv12(context)) { throw new IllegalStateException(); } if (algorithm != null && algorithm.getSignature() != getSignatureAlgorithm()) { throw new IllegalStateException(); } short hashAlgorithm = algorithm == null ? HashAlgorithm.sha1 : algorithm.getHash(); Digest d = raw ? new NullDigest() : TlsUtils.createHash(hashAlgorithm); Signer s = new DSADigestSigner(createDSAImpl(hashAlgorithm), d); s.init(forSigning, makeInitParameters(forSigning, cp)); return s; }
public Digest createDigest(short hashAlgorithm) { switch (hashAlgorithm) { case HashAlgorithm.none: return new NullDigest(); case HashAlgorithm.md5: return new MD5Digest(); case HashAlgorithm.sha1: return new SHA1Digest(); case HashAlgorithm.sha224: return new SHA224Digest(); case HashAlgorithm.sha256: return new SHA256Digest(); case HashAlgorithm.sha384: return new SHA384Digest(); case HashAlgorithm.sha512: return new SHA512Digest(); default: throw new IllegalArgumentException("unknown HashAlgorithm: " + HashAlgorithm.getText(hashAlgorithm)); } }
if (raw) d = new NullDigest();