[fpc-pascal] SHA1 of a TMemoryStream

Marco van de Voort marcov at stack.nl
Sun Mar 6 01:53:32 CET 2011


In our previous episode, Jorge Aldo G. de F. Junior said:
> Uses
> 	Classes,
> 	SHA1;
> 
> Var
> 	Data : TMemoryStream;
> 	Hash : TSHA1Digest;
> 
> Begin
> 	Data := TMemoryStream.Create;
> 	Data.LoadFromFile('test6.pas');

Data.Position:=0;

> 	Hash := SHA1Buffer(Data.Memory, Data.Size);
> 	WriteLn(SHA1Print(Hash));
> 	Data.Free;
> End.





More information about the fpc-pascal mailing list