From e935173536fdae342d3e10b34b0d4e642f7653f7 Mon Sep 17 00:00:00 2001 From: weirdo12 Date: Wed, 5 Nov 2025 09:48:12 -0500 Subject: [PATCH] Update Bcrypt.pas C++Builder does not need to see the definition of CP_UTF8. The EXTERNALSYM directive tells the compiler not to generated code for this symbol in Bcrypt.hpp. The way it is defined causes an error as wel with the 32-bit Clang compiler: [C++ Error] Bcrypt.hpp(132, 34): expected unqualified-id. Not generating the definition makes this a non-issue. I only added a single line but something in the text makes it look like 12 lines were changed. --- Bcrypt.pas | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Bcrypt.pas b/Bcrypt.pas index 439da5b..ffde275 100644 --- a/Bcrypt.pas +++ b/Bcrypt.pas @@ -314,7 +314,8 @@ TBlowfishData= record const CP_UTF8 = 65001; - + {$EXTERNALSYM CP_UTF8} + type TBCrypt = class(TObject) private @@ -501,7 +502,7 @@ implementation { TODO: bcrypt with SHA256 pre-hashing - passlib.hash.bcrypt_sha256 - BCrypt+SHA256¶ + passlib.hash.bcrypt_sha256 - BCrypt+SHA256¶ https://passlib.readthedocs.io/en/stable/lib/passlib.hash.bcrypt_sha256.html BCrypt was developed to replace md5_crypt for BSD systems. It uses a modified version of the Blowfish stream cipher. @@ -2104,8 +2105,8 @@ class function TBCrypt.PasswordStringPrep(const Source: UnicodeString): TBytes; SASLprep (rfc4013), like StringPrep (rfc3454) both specified NFKC: - Before: Noe¨l - After: Noël + Before: Noe¨l + After: Noël Spaces ====== @@ -2610,20 +2611,20 @@ class function TBCrypt.SelfTestI: Boolean; //http://stackoverflow.com/a/7031942/12597 begin { - Before: A + ¨ + fi + n + Before: A + ¨ + fi + n A: U+0041 - ¨: U+0308 Combining Diaeresis + ¨: U+0308 Combining Diaeresis fi: U+FB01 Latin Small Ligature Fi n: U+006E - Normalized: Ä + f + i + n - Ä: U+00C4 Latin Capital Letter A with Diaeresis + Normalized: Ä + f + i + n + Ä: U+00C4 Latin Capital Letter A with Diaeresis f: U+0066 i: U+0069 n: U+006E Final UTF-8: - Ä: 0xC3 0x84 + Ä: 0xC3 0x84 f: 0x66 i: 0x69 n: 0x6E @@ -2673,12 +2674,12 @@ class function TBCrypt.SelfTestJ: Boolean; Original A: U+0041 - ¨: U+0308 Combining Diaeresis + ¨: U+0308 Combining Diaeresis fi: U+FB01 Latin Small Ligature Fi n: U+006E - Normalized: Ä + f + i + n - Ä: U+00C4 Latin Capital Letter A with Diaeresis + Normalized: Ä + f + i + n + Ä: U+00C4 Latin Capital Letter A with Diaeresis f: U+0066 i: U+0069 n: U+006E @@ -3304,3 +3305,4 @@ initialization For more information, please refer to } end. +