#1 2018-09-27 19:04:26

enrcas
Member
Registered: 2013-06-16
Posts: 20

SynCrypto MD5 update

is this expected?

procedure TMD5.Update(const buffer; len: Cardinal);

and the rest of update functions in the unit uses 

procedure THMAC_SHA1.Update(msg: pointer; msglen: integer);
procedure TSHA1.Update(Buffer: pointer; Len: integer);
procedure TSHA256.Update(Buffer: pointer; Len: integer);

Sorry if my question is stupid big_smile

Offline

#2 2018-09-27 21:57:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,670
Website

Re: SynCrypto MD5 update

This is indeed a known inconsistency, due to legacy code...

Use TSynHasher if you expect to support more than one algorithm at runtime, with a very unique interface.

Offline

#3 2018-09-28 14:31:50

enrcas
Member
Registered: 2013-06-16
Posts: 20

Re: SynCrypto MD5 update

Thanks!

Offline

Board footer

Powered by FluxBB