public virtual byte[] Sign(byte[] b) { String signMode = hashAlgorithm + "with" + encryptionAlgorithm; ISigner sig = SignerUtilities.GetSigner(signMode); sig.Init(true, pk); sig.BlockUpdate(b, 0, b.Length); return sig.GenerateSignature(); }