Proprietary software by ® Rudoysecurity™

Record THashSHA2

Модуль

Объявления

type THashSHA2 = record

Описание

Record to generate SHA2 Hash values from data

Обзор

Nested Types

Public TSHA2Version = (...);

Поля

Private nested const CBuffer32Length = 64;
Private nested const CBuffer64Length = 128;
Private FBitLength: UInt64;
Private FBuffer: array [0..127] of Byte;
Private FFinalized: Boolean;
Public FHash: array[0..7] of Cardinal
Public FHash64: array[0..7] of UInt64
Private FIndex: Cardinal;
Private FProperty1: Integer;
Published FVersion: Integer

Методы

Public class function Create(AHashVersion: TSHA2Version = TSHA2Version.SHA256): THashSHA2; static; inline;
Public function GetBlockSize: Integer; inline;
Public class function GetHashBytes(const AData: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;
Public class function GetHashBytes(const AStream: TStream; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;
Public class function GetHashBytesFromFile(const AFileName: TFileName; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; static;
Public function GetHashSize: Integer; inline;
Public class function GetHashString(const AStream: TStream; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; overload; static; inline;
Public class function GetHashString(const AString: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; overload; static; inline;
Public class function GetHashStringFromFile(const AFileName: TFileName; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; static; inline;
Public class function GetHMAC(const AData, AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; static; inline;
Public class function GetHMACAsBytes(const AData: TBytes; const AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;
Public class function GetHMACAsBytes(const AData, AKey: TBytes; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;
Public class function GetHMACAsBytes(const AData, AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;
Public class function GetHMACAsBytes(const AData: string; const AKey: TBytes; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;
Public function HashAsBytes: TBytes; inline;
Public function HashAsString: string; inline;
Private function GetDigest: TBytes;
Public procedure Reset; inline;
Public procedure Update(const AData: TBytes; ALength: Cardinal = 0); overload; inline;
Public procedure Update(const AData; ALength: Cardinal); overload;
Public procedure Update(const Input: string); overload; inline;
Private procedure CheckFinalized; inline;
Private procedure Compress; inline;
Private procedure Compress32;
Private procedure Compress64;
Private procedure Finalize; inline;
Private procedure Finalize32;
Private procedure Finalize64;
Private procedure Initialize(AVersion: TSHA2Version);
Private procedure SetProperty1(val: Integer);
Private procedure Update(const AData: PByte; ALength: Cardinal); overload;

Свойства

Public property Property1: Integer read FProperty1 write SetProperty1;

Описание

Nested Types

Public TSHA2Version = (...);

This item has no description.

Значение
  • SHA224
  • SHA256
  • SHA384
  • SHA512
  • SHA512_224
  • SHA512_256

Поля

Private nested const CBuffer32Length = 64;

This item has no description.

Private nested const CBuffer64Length = 128;

This item has no description.

Private FBitLength: UInt64;

This item has no description.

Private FBuffer: array [0..127] of Byte;

This item has no description.

Private FFinalized: Boolean;

This item has no description.

Public FHash: array[0..7] of Cardinal

This item has no description.

Public FHash64: array[0..7] of UInt64

This item has no description.

Private FIndex: Cardinal;

This item has no description.

Private FProperty1: Integer;

This item has no description.

Published FVersion: Integer

This item has no description.

Методы

Public class function Create(AHashVersion: TSHA2Version = TSHA2Version.SHA256): THashSHA2; static; inline;

Initialize the Record used to calculate the SHA2 Hash

Public function GetBlockSize: Integer; inline;

Returns the BlockSize for this hash instance

Public class function GetHashBytes(const AData: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;

Hash the given string and returns it's hash value as integer

Public class function GetHashBytes(const AStream: TStream; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;

Hash the given stream and returns it's hash value as TBytes

Public class function GetHashBytesFromFile(const AFileName: TFileName; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; static;

Hash the file with given FileName and returns it's hash value as TBytes

Public function GetHashSize: Integer; inline;

Returns the HashSize for this hash instance

Public class function GetHashString(const AStream: TStream; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; overload; static; inline;

Hash the given stream and returns it's hash value as string

Public class function GetHashString(const AString: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; overload; static; inline;

Hash the given string and returns it's hash value as string

Public class function GetHashStringFromFile(const AFileName: TFileName; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; static; inline;

Hash the file with given FileName and returns it's hash value as string

Public class function GetHMAC(const AData, AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; static; inline;

Gets the string associated to the HMAC authentication

Public class function GetHMACAsBytes(const AData: TBytes; const AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;

This item has no description.

Public class function GetHMACAsBytes(const AData, AKey: TBytes; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;

This item has no description.

Public class function GetHMACAsBytes(const AData, AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;

Gets the Digest associated to the HMAC authentication

Public class function GetHMACAsBytes(const AData: string; const AKey: TBytes; AHashVersion: TSHA2Version = TSHA2Version.SHA256): TBytes; overload; static;

This item has no description.

Public function HashAsBytes: TBytes; inline;

Returns the hash value as a TBytes

Public function HashAsString: string; inline;

Returns the hash value as string

Private function GetDigest: TBytes;

This item has no description.

Public procedure Reset; inline;

Puts the state machine of the generator in it's initial state.

Public procedure Update(const AData: TBytes; ALength: Cardinal = 0); overload; inline;

This item has no description.

Public procedure Update(const AData; ALength: Cardinal); overload;

Update the Hash value with the given Data.

Public procedure Update(const Input: string); overload; inline;

This item has no description.

Private procedure CheckFinalized; inline;

This item has no description.

Private procedure Compress; inline;

This item has no description.

Private procedure Compress32;

This item has no description.

Private procedure Compress64;

This item has no description.

Private procedure Finalize; inline;

This item has no description.

Private procedure Finalize32;

This item has no description.

Private procedure Finalize64;

This item has no description.

Private procedure Initialize(AVersion: TSHA2Version);

This item has no description.

Private procedure SetProperty1(val: Integer);

This item has no description.

Private procedure Update(const AData: PByte; ALength: Cardinal); overload;

This item has no description.

Свойства

Public property Property1: Integer read FProperty1 write SetProperty1;

This item has no description.

© Andrey Igorevich Rudoy, 2005-2025 jear
Сгенерировал PasDoc 0.16.0-snapshot.