Tag: sign

在UWP中使用基于CMS的格式签名数据

我需要在WCF服务和UWP应用之间传输数据。 所以我在收到数据后签名并validation数据。 我有个问题。 WCF中签名的数据结果是UWP应用程序的差异。(当然,我无法validation数据)这是我的源代码: // WCF private String Sign(string Message) { ContentInfo cont = new ContentInfo(Encoding.UTF8.GetBytes(Message)); SignedCms signed = new SignedCms(cont, true); _SignerCert = new X509Certificate2(“Path”, “Password”); CmsSigner signer = new CmsSigner(_SignerCert); signer.IncludeOption = X509IncludeOption.None; signed.ComputeSignature(signer); return Convert.ToBase64String(signed.Encode()); } 和 //UWP public static async Task Sign(String Message) { StorageFolder appInstalledFolder = Windows.ApplicationModel.Package.Current.InstalledLocation; var CerFile = […]

在numericUpDown值中添加一个符号(如%)

我正在尝试将“%”符号添加到我的numericUpDown,即readonly = false。 所以就像5%一样。 这可能吗? 谢谢

如何使用Bouncy Castle库在C#中使用PGP密钥签署txt文件

有没有人有一个如何在C#和Bouncy Castle库中使用PGP密钥签署txt文件的示例。 不加密文件,只添加签名。

使用iTextSharp 5.3.3和USB令牌签署PDF

我是iTextSharp(和StackOverFlow)的新手。 我正在尝试使用外部USB令牌在C#中签名PDF。 我尝试使用我从互联网上挖掘的以下代码。 Org.BouncyCastle.X509.X509CertificateParser cp = new Org.BouncyCastle.X509.X509CertificateParser(); //Get Sertifiacte X509Certificate2 certClient = null; X509Store st = new X509Store(StoreName.My, StoreLocation.CurrentUser); st.Open(OpenFlags.MaxAllowed); X509Certificate2Collection collection = X509Certificate2UI.SelectFromCollection(st.Certificates, “Please choose certificate:”, “”, X509SelectionFlag.SingleSelection); if (collection.Count > 0){ certClient = collection[0]; } st.Close(); //Get Cert Chain IList chain = new List(); X509Chain x509chain = new X509Chain(); x509chain.Build(certClient ); foreach […]