EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Hashing functions

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#2692
Posted: 04/04/2007 12:48:24
by Santiago CastaƱo (Standard support level)
Joined: 04/16/2006
Posts: 155

Hi!,

I'm working with Symmetric encryptors (AES256), and I'm having problems getting a library for Delphi that makes hashes of strings also in Visual Studio. I'm in particular interested in SHA256/SHA512. As SBB has this hashes, I wanted to know if it's possible for us to use them (and a little example if it's possible). I couldn't find anything about it in the help.

It'll ve marvelous if SBB abstract us from the developing language with those calls :p

Many thanks
#2695
Posted: 04/04/2007 13:02:47
by Ken Ivanov (EldoS Corp.)

Please try the TElHashFunction class (SBHashFunction unit/namespace). This class is not documented as was implemented for internal use by other SBB classes.

TElHashFunction class should be used in the following way:
1) Create the TElHashFunction instance, passing the desired algorithm constant to its constructor (leave CryptoProvider parameter empty),
2) consequently call the Update method to pass data chunk by chunk,
3) call the Finish method to obtain the message digest corresponding to the passed data.

The following algorithm constants are defined:
SB_ALGORITHM_DGST_BASE = $7100;
SB_ALGORITHM_DGST_SHA1 = SmallInt(SB_ALGORITHM_DGST_BASE + $01);
SB_ALGORITHM_DGST_MD5 = SmallInt(SB_ALGORITHM_DGST_BASE + $02);
SB_ALGORITHM_DGST_MD2 = SmallInt(SB_ALGORITHM_DGST_BASE + $03);
SB_ALGORITHM_DGST_SHA256 = SmallInt(SB_ALGORITHM_DGST_BASE + $04);
SB_ALGORITHM_DGST_SHA384 = SmallInt(SB_ALGORITHM_DGST_BASE + $05);
SB_ALGORITHM_DGST_SHA512 = SmallInt(SB_ALGORITHM_DGST_BASE + $06);
SB_ALGORITHM_DGST_SHA224 = SmallInt(SB_ALGORITHM_DGST_BASE + $07);
SB_ALGORITHM_DGST_MD4 = SmallInt(SB_ALGORITHM_DGST_BASE + $08);
SB_ALGORITHM_DGST_RIPEMD160 = SmallInt(SB_ALGORITHM_DGST_BASE + $09);
SB_ALGORITHM_DGST_CRC32 = SmallInt(SB_ALGORITHM_DGST_BASE + $0A);
SB_ALGORITHM_DGST_SSL3 = SmallInt(SB_ALGORITHM_DGST_BASE + $0B);

Reply

Statistics

Topic viewed 1826 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!