/// <summary> /// Gets the signing stream. /// </summary> /// <returns></returns> public HashingStream GetSigningStream(Keyczar keyczar) { var digest = PublicKey.GetDigest(); var signer = new DsaDigestSigner(new DsaSigner(), digest); var param = new DsaPrivateKeyParameters(X.ToBouncyBigInteger(), new DsaParameters(PublicKey.P.ToBouncyBigInteger(), PublicKey.Q.ToBouncyBigInteger(), PublicKey.G.ToBouncyBigInteger())); signer.Init(forSigning: true, parameters: new ParametersWithRandom(param, Secure.Random)); return(new DigestStream(signer)); }