VB Script Trying to use Capicom



I had a script which used Capicom to calculate a MD5 hash for a file
and compare that to the files previous hash (calculated before network
transmission). The server it was on was rebuilt and some changes were
made to the script.

I have independently tested the changes and they work.

The original function is broke.

The error message I get is:

error loading DLL 'crypt.Algorithm'

It breaks on the line "crypt.Algorithm = 3"

I installed Capicom and gave Everyone full access to it. That hasn't
solved the problem. The code below is actually copied from the Capicom
examples.

How to I test whether Capicom is actually there and test what
functionality is available from it?



Function Hash(filename)
Dim crypt: Set crypt = CreateObject("CAPICOM.HashedData")

' CAPICOM_HASH_ALGORITHM_MD5
crypt.Algorithm = 3

Dim stream: Set stream = CreateObject("ADODB.Stream")
stream.Type = 1 ' adTypeBinary
stream.Open
stream.LoadFromFile filename

Do Until stream.EOS : crypt.Hash stream.Read(1024000) : Loop

Hash = crypt.Value
End Function



.



Relevant Pages

  • Signature verification with capicom
    ... sign verify reverse the entire buffer. ... capicom says that the hashes don't match. ... Iaik sends ... >with capicom but the hash created from the original file. ...
    (microsoft.public.platformsdk.security)
  • Re: VB Script Trying to use Capicom
    ... The server it was on was rebuilt and some changes were ... made to the script. ... error loading DLL 'crypt.Algorithm' ... I installed Capicom and gave Everyone full access to it. ...
    (microsoft.public.scripting.vbscript)
  • Re: Signature verification with capicom
    ... > sign verify reverse the entire buffer. ... capicom says that the hashes don't match. ... > Iaik sends ... >>with capicom but the hash created from the original file. ...
    (microsoft.public.platformsdk.security)
  • Signature verification with capicom
    ... I'm developing an application that signs a pdf file with iaik ... I'm using the capicom libraries, the sign process goes well but in the ... If I make the hash with iaik with a plain text file, ...
    (microsoft.public.platformsdk.security)
  • Re: Signature verification with capicom
    ... discussed several tims in CAPICOM list. ... Most S/MIME applications that I have seen sign the raw binary data (not UNICODE ... > I'm developing an application that signs a pdf file with iaik ... > with capicom but the hash created from the original file. ...
    (microsoft.public.platformsdk.security)