none
SHA256 Certificate RRS feed

  • Question

  • Hi all,

    i'd like to check (on Windows XP SP2, .NET 1.1) , if my X509-Certifcate is SHA256-Certifcate.
    I try to use the following:
    {
       cert = new CAPICOM.CertificateClass();  
       cert.Load("my_cert.cer",null, CAPICOM.CAPICOM_KEY_STORAGE_FLAG.CAPICOM_KEY_STORAGE_DEFAULT, CAPICOM.CAPICOM_KEY_LOCATION.CAPICOM_CURRENT_USER_KEY);
       string sr = cert.Export(CAPICOM.CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64);
       X509Certificate c1 = new X509Certificate(Convert.FromBase64String(sr));

    }

    The Property c1.GetKeyAlgorithm() is "1.2.840.113549.1.1.1" what means "RSA encryption" and NOT
    1.2.840.113549.1.1.11" what I'm expecting.
    Where I'm wrong?

    Thanks a lot,

    Alex
    Wednesday, October 14, 2009 3:54 PM

Answers

  • Greetings,

     Link is given below.

    http://www.obviex.com/samples/Code.aspx?Source=HashCS&Title=Hashing%20Data&Lang=C%23

    Take Care

    PL
    • Marked as answer by eryang Tuesday, October 20, 2009 2:57 AM
    Friday, October 16, 2009 10:08 AM