コード例 #1
0
        public void Sign(string contentFilename, string thumbprint, string signatureFilename, bool useLocalSystemStorage = false)
        {
            var signatureContent = crypt.Sign(File.ReadAllBytes(contentFilename),
                                              crypt.GetCertificateWithPrivateKey(thumbprint, useLocalSystemStorage).RawData);

            File.Delete(signatureFilename);
            File.WriteAllBytes(signatureFilename, signatureContent);
        }