How to make a 64 byte signed hash of a string with .pfx file in .NET

Posted on 2006-06-05
Last Modified: 2009-03-31

I am using .NET.
I need an example code, that I can use to sign a hash of a string with a certificate in .pfx file, and then to verify it. The signed hash must be 64 bytes. I can't use CAPICOM, because it generates a signature that includes the certificate in it, so it becomes too long.

Question by:Alex7777qq
    LVL 3

    Accepted Solution

    I see that your requirement is not to use CAPICOM, but have you tried "Sign Tool" (SignTool.exe).


    How sign the code by own certificate and install the certificate on device


    Author Comment

    I would like to do the signing with code, not manually.
    LVL 3

    Expert Comment


    Am I missing something, Alex? SignTool.exe is a command line tool. That means it CAN be scripted. In fact the whole Code Project article pretty much shows you how to do it.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now