If you are looking for an updated version of DCPcrypt try either

I’ve not tried either of them (and I’m told they are quite different to each other – no idea which is closest to the original)!

DCPcrypt has finally been retired (except for the versions above). I’ve been developing it since 1999 and from 2007 (or so) it has been developing code rot as I’ve not had time to update it. It was good while it worked but now there has come a point where I can’t guarantee that it will work correctly (or securely) under recent versions of Delphi.

For the curious, the code is still available below. However, I don’t recommend anyone to use it any more.

2 Replies to “DCPcrypt”

  1. Dear Sir,

    I have been trying to work out the example of SHA256 Hashing using TDCP_SHA256 Delphi component but after several days of hard work and many failures I must seek help.

    Example is given on the Wiki page

    I do not know how to hash string value that represent binary value of a bitcoin public key.

    Whatever I do I always get wrong answer – different than the result in line 2 of the example.

    Could you please help me with a few lines of code please?

    1. Hello Popovic , this is my example, I use to hash files, so I do it with streams…

      myDigestSha2: array[0..31] of byte; //to 256bit digest (32bytes)
      myDCP_sha2: TDCP_sha256;
      myHash_sha256 :AnsiString;
      lMemoryStream :TMemoryStream;
      … I keep my stream…
      myDCP_sha2 := TDCP_sha256.Create(nil);
      myDCP_sha2.UpdateStream(lMemoryStream, lMemoryStream.Size);
      myHash_sha256 := ”;
      for i:= 0 to 31 do myHash_sha256 := myHash_sha256 + IntToHex(myDigestSha2[i],2);
      … and I have my Hash on myHash_sha256

      hint: you always need to burn and init to initialize your TDCP Object to calc new hash

      Roberto Novakosky

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.