[fpc-pascal] SHA1 of a TMemoryStream
Jorge Aldo G. de F. Junior
jagfj80 at gmail.com
Sun Mar 6 01:34:32 CET 2011
I need to perform a Hash of data stored at a TMemoryStream...
But unfortunately, the following program spits out different results
if i run it in sucession... Note that the file being read (test6.pas)
Data : TMemoryStream;
Hash : TSHA1Digest;
Data := TMemoryStream.Create;
Hash := SHA1Buffer(Data.Memory, Data.Size);
Am i doing (probably) anything wrong ?
Thanks in advance.
More information about the fpc-pascal