![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Misc/SecureHash.h"#include "Async/AsyncWork.h"#include "HAL/FileManager.h"#include "Memory/MemoryView.h"#include "Misc/Paths.h"#include "Misc/StringBuilder.h"#include "Serialization/CompactBinaryWriter.h"Macros | |
| #define | UE_PLATFORM_SHA_FALLBACK 1 |
| #define | UE_PLATFORM_SHA_X86 0 |
| #define | UE_PLATFORM_SHA_ARMV8 0 |
| #define | MD5_F(x, y, z) (((x) & (y)) | ((~x) & (z))) |
| #define | MD5_G(x, y, z) (((x) & (z)) | ((y) & (~z))) |
| #define | MD5_H(x, y, z) ((x) ^ (y) ^ (z)) |
| #define | MD5_I(x, y, z) ((y) ^ ((x) | (~z))) |
| #define | ROTLEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) |
| #define | MD5_FF(a, b, c, d, x, s, ac) |
| #define | MD5_GG(a, b, c, d, x, s, ac) |
| #define | MD5_HH(a, b, c, d, x, s, ac) |
| #define | MD5_II(a, b, c, d, x, s, ac) |
| #define | ROL32(_val32, _nBits) (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits)))) |
| #define | SHABLK0(i) (block[i]) |
| #define | SHABLK(i) (block[i&15] = ROL32(block[(i+13)&15] ^ block[(i+8)&15] ^ block[(i+2)&15] ^ block[i&15],1)) |
| #define | _R0(v, w, x, y, z, i) { z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); } |
| #define | _R1(v, w, x, y, z, i) { z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); } |
| #define | _R2(v, w, x, y, z, i) { z+=(w^x^y)+SHABLK(i)+0x6ED9EBA1+ROL32(v,5); w=ROL32(w,30); } |
| #define | _R3(v, w, x, y, z, i) { z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5); w=ROL32(w,30); } |
| #define | _R4(v, w, x, y, z, i) { z+=(w^x^y)+SHABLK(i)+0xCA62C1D6+ROL32(v,5); w=ROL32(w,30); } |
| #define | SHA1_BLOCK_SIZE 64 |
| #define | DISABLE_AUTHENTICATION_FOR_DEV 1 |
Enumerations | |
| enum | { _S11 =7 } |
| enum | { _S12 =12 } |
| enum | { _S13 =17 } |
| enum | { _S14 =22 } |
| enum | { _S21 =5 } |
| enum | { _S22 =9 } |
| enum | { _S23 =14 } |
| enum | { _S24 =20 } |
| enum | { _S31 =4 } |
| enum | { _S32 =11 } |
| enum | { _S33 =16 } |
| enum | { _S34 =23 } |
| enum | { _S41 =6 } |
| enum | { _S42 =10 } |
| enum | { _S43 =15 } |
| enum | { _S44 =21 } |
Functions | |
| DEFINE_LOG_CATEGORY_STATIC (LogSecureHash, Log, All) | |
| void | appOnFailSHAVerification (const TCHAR *FailedPathname, bool bFailedDueToMissingHash) |
| #define _R0 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) | { z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); } |
| #define _R1 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) | { z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); } |
| #define _R3 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) | { z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5); w=ROL32(w,30); } |
| #define DISABLE_AUTHENTICATION_FOR_DEV 1 |
Callback that is called if the asynchronous SHA verification fails This will be called from a pooled thread.
| FailedPathname | Pathname of file that failed to verify |
| bFailedDueToMissingHash | true if the reason for the failure was that the hash was missing, and that was set as being an error condition |
| #define MD5_F | ( | x, | |
| y, | |||
| z | |||
| ) | (((x) & (y)) | ((~x) & (z))) |
| #define MD5_FF | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| x, | |||
| s, | |||
| ac | |||
| ) |
| #define MD5_G | ( | x, | |
| y, | |||
| z | |||
| ) | (((x) & (z)) | ((y) & (~z))) |
| #define MD5_GG | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| x, | |||
| s, | |||
| ac | |||
| ) |
| #define MD5_H | ( | x, | |
| y, | |||
| z | |||
| ) | ((x) ^ (y) ^ (z)) |
| #define MD5_HH | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| x, | |||
| s, | |||
| ac | |||
| ) |
| #define MD5_I | ( | x, | |
| y, | |||
| z | |||
| ) | ((y) ^ ((x) | (~z))) |
| #define MD5_II | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| x, | |||
| s, | |||
| ac | |||
| ) |
| #define ROTLEFT | ( | x, | |
| n | |||
| ) | (((x) << (n)) | ((x) >> (32-(n)))) |
| #define SHA1_BLOCK_SIZE 64 |
| #define SHABLK | ( | i | ) | (block[i&15] = ROL32(block[(i+13)&15] ^ block[(i+8)&15] ^ block[(i+2)&15] ^ block[i&15],1)) |
| #define SHABLK0 | ( | i | ) | (block[i]) |
| #define UE_PLATFORM_SHA_ARMV8 0 |
| #define UE_PLATFORM_SHA_FALLBACK 1 |
| #define UE_PLATFORM_SHA_X86 0 |
Callback that is called if the asynchronous SHA verification fails This will be called from a pooled thread.
NOTE: Each platform is expected to implement this!
| FailedPathname | Pathname of file that failed to verify |
| bFailedDueToMissingHash | true if the reason for the failure was that the hash was missing, and that was set as being an error condition |
| DEFINE_LOG_CATEGORY_STATIC | ( | LogSecureHash | , |
| Log | , | ||
| All | |||
| ) |