System.Hash.THashSHA1.Update
Delphi
procedure Update(const AData; ALength: Cardinal); overload;
procedure Update(const AData: TBytes; ALength: Cardinal = 0); overload; inline;
procedure Update(const Input: string); overload; inline;
C++
void __fastcall Update(const void *AData, unsigned ALength)/* overload */;
void __fastcall Update(const System::DynamicArray<System::Byte> AData, unsigned ALength = (unsigned)(0x0))/* overload */;
void __fastcall Update(const System::UnicodeString Input)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Hash.pas System.Hash.hpp |
System.Hash | THashSHA1 |
Description
Updates the hash value of this instance of THashSHA1 with the provided data.
You can provide data in the following ways:
- As a String.
- As bytes. In this case you can specify the optional parameter
ALength
, which defines the length of the provided data. The default value ofALength
is 0.
- Note: If you do not specify the length of the provided data, the default value serves as a flag that tells Update to calculate the length of
AData
.
- As any type. In this case, you must also specify the length of the provided data.
Exceptions
A call to Update may raise the following exception:
Exception | Exception.Message | Scenarios |
---|---|---|
SHA1: Cannot update a finalized hash |
|