System.Hash.THashSHA1

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

THashSHA1 = record

C++

struct DECLSPEC_DRECORD THashSHA1
{
private:
    System::StaticArray<unsigned, 5> FHash;
    __int64 FBitLength;
    System::StaticArray<System::Byte, 64> FBuffer;
    int FIndex;
    bool FFinalized;
    void __fastcall Initialize();
    void __fastcall CheckFinalized();
    void __fastcall Compress();
    void __fastcall Finalize();
#ifndef _WIN64
    System::DynamicArray<System::Byte> __fastcall GetDigest();
#else /* _WIN64 */
    System::TArray__1<System::Byte> __fastcall GetDigest();
#endif /* _WIN64 */
    void __fastcall Update(const System::PByte AData, unsigned ALength)/* overload */;
public:
    static THashSHA1 __fastcall Create();
    void __fastcall Reset();
    void __fastcall Update(const void *AData, unsigned ALength)/* overload */;
#ifndef _WIN64
    void __fastcall Update(const System::DynamicArray<System::Byte> AData, unsigned ALength = (unsigned)(0x0))/* overload */;
#else /* _WIN64 */
    void __fastcall Update(const System::TArray__1<System::Byte> AData, unsigned ALength = (unsigned)(0x0))/* overload */;
#endif /* _WIN64 */
    void __fastcall Update(const System::UnicodeString Input)/* overload */;
    int __fastcall GetBlockSize();
    int __fastcall GetHashSize();
#ifndef _WIN64
    System::DynamicArray<System::Byte> __fastcall HashAsBytes();
#else /* _WIN64 */
    System::TArray__1<System::Byte> __fastcall HashAsBytes();
#endif /* _WIN64 */
    System::UnicodeString __fastcall HashAsString();
#ifndef _WIN64
    static System::DynamicArray<System::Byte> __fastcall GetHashBytes(const System::UnicodeString AData)/* overload */;
#else /* _WIN64 */
    static System::TArray__1<System::Byte> __fastcall GetHashBytes(const System::UnicodeString AData)/* overload */;
#endif /* _WIN64 */
    static System::UnicodeString __fastcall GetHashString(const System::UnicodeString AString)/* overload */;
#ifndef _WIN64
    static System::DynamicArray<System::Byte> __fastcall GetHashBytes(System::Classes::TStream* const AStream)/* overload */;
#else /* _WIN64 */
    static System::TArray__1<System::Byte> __fastcall GetHashBytes(System::Classes::TStream* const AStream)/* overload */;
#endif /* _WIN64 */
    static System::UnicodeString __fastcall GetHashString(System::Classes::TStream* const AStream)/* overload */;
#ifndef _WIN64
    static System::DynamicArray<System::Byte> __fastcall GetHashBytesFromFile(const System::Sysutils::TFileName AFileName);
#else /* _WIN64 */
    static System::TArray__1<System::Byte> __fastcall GetHashBytesFromFile(const System::Sysutils::TFileName AFileName);
#endif /* _WIN64 */
    static System::UnicodeString __fastcall GetHashStringFromFile(const System::Sysutils::TFileName AFileName);
    static System::UnicodeString __fastcall GetHMAC(const System::UnicodeString AData, const System::UnicodeString AKey);
#ifndef _WIN64
    static System::DynamicArray<System::Byte> __fastcall GetHMACAsBytes(const System::UnicodeString AData, const System::UnicodeString AKey)/* overload */;
    static System::DynamicArray<System::Byte> __fastcall GetHMACAsBytes(const System::UnicodeString AData, const System::DynamicArray<System::Byte> AKey)/* overload */;
    static System::DynamicArray<System::Byte> __fastcall GetHMACAsBytes(const System::DynamicArray<System::Byte> AData, const System::UnicodeString AKey)/* overload */;
    static System::DynamicArray<System::Byte> __fastcall GetHMACAsBytes(const System::DynamicArray<System::Byte> AData, const System::DynamicArray<System::Byte> AKey)/* overload */;
#else /* _WIN64 */
    static System::TArray__1<System::Byte> __fastcall GetHMACAsBytes(const System::UnicodeString AData, const System::UnicodeString AKey)/* overload */;
    static System::TArray__1<System::Byte> __fastcall GetHMACAsBytes(const System::UnicodeString AData, const System::TArray__1<System::Byte> AKey)/* overload */;
    static System::TArray__1<System::Byte> __fastcall GetHMACAsBytes(const System::TArray__1<System::Byte> AData, const System::UnicodeString AKey)/* overload */;
    static System::TArray__1<System::Byte> __fastcall GetHMACAsBytes(const System::TArray__1<System::Byte> AData, const System::TArray__1<System::Byte> AKey)/* overload */;
#endif /* _WIN64 */
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.Hash.pas
System.Hash.hpp
System.Hash System.Hash


説明

SHA-1 ハッシュを実装するレコードです。

THashSHA1 には、以下のようなメソッドが用意されています。

  • Update: 渡されたデータを使ってハッシュ値を更新します。
  • GetHashString: 渡された文字列のハッシュ値を返します。
  • GetHashStringFromFile: 提供されたファイルのハッシュ値を返します。
  • GetHMAC: HMAC 認証(ハッシュベース メッセージ認証符号)に関連付けられた文字列表現を返します。

関連項目