No announcement yet.

Discussion re AES 128/192/256 in XP SP3

  • Filter
  • Time
  • Show
Clear All
new posts

  • Discussion re AES 128/192/256 in XP SP3

    Hi Peter.

    #10 in MSEncDec is the first hurdle in MSEncDec. Oh, dear. I have had a pile of such messages during development but none that early.

    You didn't get a #10 in crGetDefaultRSAHandle so the CSP was accepted. I forgot to change the Title in Macro SysErrMsg to MSEncDec.exe for the source code and MSEncDec.dll in the library so I cannot tell which one you are getting the message from. Having said that I have %CALG_SHA_256 'hard wired' in the dll so it looks like you are getting the message in the source code. Am I on the button?

    #10 in MSEncDEc is got from
    If CryptCreateHash( hProv, %CALG_SHA_256, 0, 0, hHash ) = %False Then
      WinErr = GetLastError : SysErrMsg( "CryptCreateHash", 10 )
      Function = ""
      GoTo TidyUp
    Have you changed that %CALG_SHA_256?

  • #2
    Hi David,

    Yes I got the error exactly at the line you pointed to:
    IF CryptCreateHash( hProv, %CALG_SHA_256, 0, 0, hHash ) = %False THEN

    I have not changed anything in your code other than the path to the file.
    The function works when I use %MD5 instead of %CALG_SHA_256. I wonder if something is not up-to-date in my machine? I use XP Professional SP 2.
    I think CALG_SHA_256 is supported on Windows Server 2003 and later only.
    I am not sure if I can install this on XP?




    • #3
      I just found the answer...
      XP SP3 supports it. Well, I will not upgrade for that...



      • #4
        The first paragraph of the SHA256 and so on link to the Source Code forum is a caveat.

        What surprised me is that SP2 knew what %PROV_RSA_AES is. If it does then it would use the default CSP. If it had no default then it would have $MS_ENH_RSA_AES_PROV forced upon it in which case crGetDefaultRSAHandle would have certainly gone down.

        BTW, SP3 is as solid as a rock and it is the fastest XP.