magicxor / cryptobboxvcl Goto Github PK
View Code? Open in Web Editor NEWCryptoBlackbox was a free package of SecureBlackbox product, offered for .NET, Java and VCL platforms.
License: Other
CryptoBlackbox was a free package of SecureBlackbox product, offered for .NET, Java and VCL platforms.
License: Other
Hello,
I can not compile in Delphi 10.3 because function ReleaseString throw an error.
I had to changer releaseString(myVar) to myVar := '' in units :
SBCRL.pas
SBCustomCertStorage.pas
SBPublicKeyCrypto.pas
SBRDN.pas
SBStrUtils.pas
SBUnicode.pas
SBUtils.pas
SBX509Ext.pas
To use this library with Delphi 10.2 and later, three procedures in SBUtils.pas
need to be modified. I've chosen to overload them for not touching the original code.
// Addition for DX 10.2
// "Given that dynamic arrays are managed types, involving reference counting
// and associated helper function generation, casting array elements using
// the @ operator is disallowed as it leads to memory corruption. Performing a
// similar operation is still allowed using an explicit cast operation, under the
// developer responsibility."
// http://docwiki.embarcadero.com/RADStudio/Tokyo/en/What%27s_New
procedure PointerToLInt(var B : PLInt; const P : Pointer; Size : integer);
begin
PointerToLInt(B, ByteArray(P), Size);
end;
procedure LIntToPointer(B: PLInt; P: Pointer; var Size: LongInt);
begin
LIntToPointer(B, ByteArray(P), Size);
end;
procedure SBMove(Src: ByteArray; SrcOffset: Integer; Dst: Pointer; DstOffset: Integer; Size: Integer);
begin
SBMove(Src, SrcOffset, ByteArray(Dst), DstOffset, Size);
end;
And of course:
procedure PointerToLInt(var B : PLInt; const P : Pointer; Size : integer); overload;
procedure LIntToPointer(B: PLInt; P: Pointer; var Size: LongInt); overload;
procedure SBMove(Src: ByteArray; SrcOffset: Integer; Dst: Pointer; DstOffset: Integer; Size: Integer); overload;
For not having to modify the project compiler settings in every project where you use this library, I would recommend to add these three lines at the top of SecBbox.inc
:
{$define SB_UNICODE_VCL}
{$define SB_NO_BYTEARRAY_CONST_ARRAYS}
{$define SB_PASCAL_STRINGS}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.