Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/Bip327/ClpBip327MuSig2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class function TBip327MuSig2.Sign(const ADomain: IECDomainParameters;
LK2Orig := TBigInteger.Create(1, System.Copy(ASecNonce, 32, 32));
LK1 := LK1Orig;
LK2 := LK2Orig;
TArrayUtilities.Fill<Byte>(ASecNonce, 0, 64, Byte(0));
TArrayUtilities.Fill(ASecNonce, 0, 64, Byte(0));
if (LK1.SignValue <= 0) or (LK1.CompareTo(LN) >= 0) then
Exit;
if (LK2.SignValue <= 0) or (LK2.CompareTo(LN) >= 0) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class function TBip327MuSig2KeyAggregation.GetSecondKey(const APubKeys: TCryptoL
Exit;
end;
System.SetLength(Result, TBip327MuSig2Utilities.BIP327_PLAIN_PUBKEY_SIZE);
TArrayUtilities.Fill<Byte>(Result, 0, System.Length(Result), Byte(0));
TArrayUtilities.Fill(Result, 0, System.Length(Result), Byte(0));
end;

class function TBip327MuSig2KeyAggregation.KeyAggCoeffInternal(const APubKeys: TCryptoLibGenericArray<TCryptoLibByteArray>;
Expand Down
4 changes: 2 additions & 2 deletions CryptoLib/src/Crypto/Bip340/ClpBip340SchnorrBatchVerifier.pas
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ class function TBip340SchnorrBatchVerifier.BatchVerify(const AItems
if (LU > 1) then
begin
System.SetLength(LZeroIV, 12);
TArrayUtilities.Fill<Byte>(LZeroIV, 0, 12, Byte(0));
TArrayUtilities.Fill(LZeroIV, 0, 12, Byte(0));
LKeyParam := TKeyParameter.Create(LSeed);
LParams := TParametersWithIV.Create(LKeyParam, LZeroIV);
LCipher := TCipherUtilities.GetCipher('CHACHA7539');
LCipher.Init(True, LParams);
System.SetLength(LZeros, 32);
TArrayUtilities.Fill<Byte>(LZeros, 0, 32, Byte(0));
TArrayUtilities.Fill(LZeros, 0, 32, Byte(0));
System.SetLength(LBlock, 32);
LJ := 0;
while LJ < (LU - 1) do
Expand Down
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/ClpBufferedAsymmetricBlockCipher.pas
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ procedure TBufferedAsymmetricBlockCipher.Reset;
begin
if FBuffer <> nil then
begin
TArrayUtilities.Fill<Byte>(FBuffer, 0, System.Length(FBuffer), Byte(0));
TArrayUtilities.Fill(FBuffer, 0, System.Length(FBuffer), Byte(0));
FBufOff := 0;
end;
end;
Expand Down
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/ClpBufferedBlockCipher.pas
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ function TBufferedBlockCipher.ProcessBytes(const AInput: TCryptoLibByteArray;

procedure TBufferedBlockCipher.Reset;
begin
TArrayUtilities.Fill<Byte>(FBuf, 0, System.Length(FBuf), Byte(0));
TArrayUtilities.Fill(FBuf, 0, System.Length(FBuf), Byte(0));
FBufOff := 0;

FCipherMode.Reset();
Expand Down
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/ClpLib25519.pas
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class function TLib25519.SignOpen(const AM: TCryptoLibByteArray; AMOff: Int32; o
if not FEd25519.Verify(ASignedMsg, ASignedMsgOff, APk, APkOff,
ASignedMsg, ASignedMsgOff + SignBytes, LMlen) then
begin
TArrayUtilities.Fill<Byte>(AM, AMOff, AMOff + ASignedMsgLen, 0);
TArrayUtilities.Fill(AM, AMOff, AMOff + ASignedMsgLen, 0);
AMlen := -1;
Exit(False);
end;
Expand Down
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/ClpPbeUtilities.pas
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ class function TPbeUtilities.GenerateCipherParameters(const AAlgorithm: String;
LParameters := LGenerator.GenerateDerivedMacParameters(LBitLen);
end;

TArrayUtilities.Fill<Byte>(LKeyBytes, 0, System.Length(LKeyBytes), Byte(0));
TArrayUtilities.Fill(LKeyBytes, 0, System.Length(LKeyBytes), Byte(0));
Result := LParameters;
end;

Expand Down
6 changes: 3 additions & 3 deletions CryptoLib/src/Crypto/Encodings/ClpOaepEncoding.pas
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function TOaepEncoding.DecodeBlock(const AInBytes: TCryptoLibByteArray;
LCopyLen := System.Length(LBlock);

System.Move(LData[0], LBlock[System.Length(LBlock) - LCopyLen], LCopyLen);
TArrayUtilities.Fill<Byte>(LData, 0, System.Length(LData), Byte(0));
TArrayUtilities.Fill(LData, 0, System.Length(LData), Byte(0));

FMgf1Hash.Reset();

Expand Down Expand Up @@ -271,15 +271,15 @@ function TOaepEncoding.DecodeBlock(const AInBytes: TCryptoLibByteArray;

if LWrongMask <> 0 then
begin
TArrayUtilities.Fill<Byte>(LBlock, 0, System.Length(LBlock), Byte(0));
TArrayUtilities.Fill(LBlock, 0, System.Length(LBlock), Byte(0));
raise EInvalidCipherTextCryptoLibException.CreateRes(@SDataWrong);
end;

Inc(LStart);

SetLength(Result, System.Length(LBlock) - LStart);
System.Move(LBlock[LStart], Result[0], System.Length(Result));
TArrayUtilities.Fill<Byte>(LBlock, 0, System.Length(LBlock), Byte(0));
TArrayUtilities.Fill(LBlock, 0, System.Length(LBlock), Byte(0));
end;

procedure TOaepEncoding.MaskGeneratorFunction(
Expand Down
6 changes: 3 additions & 3 deletions CryptoLib/src/Crypto/Encodings/ClpPkcs1Encoding.pas
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ function TPkcs1Encoding.DecodeBlockOrRandom(const AInput: TCryptoLibByteArray;
end;

// Clear sensitive data
TArrayUtilities.Fill<Byte>(LBlock, 0, System.Length(LBlock), Byte(0));
TArrayUtilities.Fill(LBlock, 0, System.Length(LBlock), Byte(0));
end;

function TPkcs1Encoding.DecodeBlock(const AInput: TCryptoLibByteArray;
Expand Down Expand Up @@ -435,8 +435,8 @@ function TPkcs1Encoding.DecodeBlock(const AInput: TCryptoLibByteArray;
System.Move(LData[System.Length(LData) - LPlaintextLength], Result[0], LPlaintextLength);
finally
// Clear sensitive data
TArrayUtilities.Fill<Byte>(LBlock, 0, System.Length(LBlock), Byte(0));
TArrayUtilities.Fill<Byte>(FBlockBuffer, 0, Math.Max(0, System.Length(FBlockBuffer) - System.Length(LBlock)), Byte(0));
TArrayUtilities.Fill(LBlock, 0, System.Length(LBlock), Byte(0));
TArrayUtilities.Fill(FBlockBuffer, 0, Math.Max(0, System.Length(FBlockBuffer) - System.Length(LBlock)), Byte(0));
end;
end;

Expand Down
6 changes: 3 additions & 3 deletions CryptoLib/src/Crypto/Engines/ClpAesEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ function TAesEngine.GenerateWorkingKey(AForEncryption: Boolean;
LKeyLen := System.Length(AKey);
if ((LKeyLen < 16) or (LKeyLen > 32) or ((LKeyLen and 7) <> 0)) then
begin
TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
raise EArgumentCryptoLibException.CreateRes(@SInvalidKeyLength);
end;

Expand Down Expand Up @@ -684,7 +684,7 @@ function TAesEngine.GenerateWorkingKey(AForEncryption: Boolean;
end
else
begin
TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
raise EInvalidOperationCryptoLibException.CreateRes(@SInvalidOperation);
end;
end;
Expand All @@ -703,7 +703,7 @@ function TAesEngine.GenerateWorkingKey(AForEncryption: Boolean;

Result := LBigW;

TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
end;

function TAesEngine.GetAlgorithmName: String;
Expand Down
6 changes: 3 additions & 3 deletions CryptoLib/src/Crypto/Engines/ClpAesEngineX86.pas
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ procedure TAesEngineX86.CreateRoundKeys(AForEncryption: Boolean;
LKeyLen := System.Length(AKey);
if ((LKeyLen < 16) or (LKeyLen > 32) or ((LKeyLen and 7) <> 0)) then
begin
TArrayUtilities.Fill<Byte>(AKey, 0, LKeyLen, Byte(0));
TArrayUtilities.Fill(AKey, 0, LKeyLen, Byte(0));
raise EArgumentCryptoLibException.CreateRes(@SInvalidKeyLength);
end;

Expand All @@ -888,7 +888,7 @@ procedure TAesEngineX86.CreateRoundKeys(AForEncryption: Boolean;
AesNiExpandRoundKeys256(@AKey[0], LK);
end;
else
TArrayUtilities.Fill<Byte>(AKey, 0, LKeyLen, Byte(0));
TArrayUtilities.Fill(AKey, 0, LKeyLen, Byte(0));
raise EArgumentCryptoLibException.CreateRes(@SInvalidKeyLength);
end;

Expand Down Expand Up @@ -1014,7 +1014,7 @@ procedure TAesEngineX86.Init(AForEncryption: Boolean;
CreateRoundKeys(AForEncryption, LKeyCopy);
BindCipherPointers;
finally
TArrayUtilities.Fill<Byte>(LKeyCopy, 0, System.Length(LKeyCopy), Byte(0));
TArrayUtilities.Fill(LKeyCopy, 0, System.Length(LKeyCopy), Byte(0));
end;
end;

Expand Down
6 changes: 3 additions & 3 deletions CryptoLib/src/Crypto/Engines/ClpAesLightEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ function TAesLightEngine.GenerateWorkingKey(AForEncryption: Boolean;
LKeyLen := System.Length(AKey);
if ((LKeyLen < 16) or (LKeyLen > 32) or ((LKeyLen and 7) <> 0)) then
begin
TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
raise EArgumentCryptoLibException.CreateRes(@SInvalidKeyLength);
end;

Expand Down Expand Up @@ -597,7 +597,7 @@ function TAesLightEngine.GenerateWorkingKey(AForEncryption: Boolean;
end
else
begin
TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
raise EInvalidOperationCryptoLibException.CreateRes(@SInvalidOperation);
end;
end;
Expand All @@ -616,7 +616,7 @@ function TAesLightEngine.GenerateWorkingKey(AForEncryption: Boolean;

Result := LBigW;

TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
end;

function TAesLightEngine.GetAlgorithmName: String;
Expand Down
4 changes: 2 additions & 2 deletions CryptoLib/src/Crypto/Engines/ClpBlowfishEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ procedure TBlowfishEngine.SetKey(const AKey: TCryptoLibByteArray);
if ((LKeyLength < 4) or (LKeyLength > 56) or (((LKeyLength * 8) and 7) <> 0))
then
begin
TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
raise EArgumentCryptoLibException.CreateRes(@SInvalidKeyLength);
end;

Expand Down Expand Up @@ -408,7 +408,7 @@ procedure TBlowfishEngine.SetKey(const AKey: TCryptoLibByteArray);
ProcessTable(FS1[SBOX_SK - 2], FS1[SBOX_SK - 1], FS2);
ProcessTable(FS2[SBOX_SK - 2], FS2[SBOX_SK - 1], FS3);

TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
end;

procedure TBlowfishEngine.EncryptBlock(const ASrc: TCryptoLibByteArray;
Expand Down
4 changes: 2 additions & 2 deletions CryptoLib/src/Crypto/Engines/ClpIesEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ function TIesEngine.ProcessBlock(const AIn: TCryptoLibByteArray;
if (System.Length(FV) <> 0) then
begin
VZ := TArrayUtilities.Concatenate<Byte>([FV, BigZ]);
TArrayUtilities.Fill<Byte>(BigZ, 0, System.Length(BigZ), Byte(0));
TArrayUtilities.Fill(BigZ, 0, System.Length(BigZ), Byte(0));
BigZ := VZ;
end;

Expand All @@ -618,7 +618,7 @@ function TIesEngine.ProcessBlock(const AIn: TCryptoLibByteArray;
end;

finally
TArrayUtilities.Fill<Byte>(BigZ, 0, System.Length(BigZ), Byte(0));
TArrayUtilities.Fill(BigZ, 0, System.Length(BigZ), Byte(0));
end;
end;

Expand Down
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/Engines/ClpPascalCoinIesEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function TPascalCoinIesEngine.ProcessBlock(const AIn: TCryptoLibByteArray;
end;

finally
TArrayUtilities.Fill<Byte>(LBigZ, 0, System.Length(LBigZ), Byte(0));
TArrayUtilities.Fill(LBigZ, 0, System.Length(LBigZ), Byte(0));
end;
end;

Expand Down
2 changes: 1 addition & 1 deletion CryptoLib/src/Crypto/Engines/ClpRfc3211WrapEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function TRfc3211WrapEngine.Unwrap(const AInBytes: TCryptoLibByteArray;
LNonEqual := LNonEqual or (LCheck xor LCekBlock[4 + LI]);
end;

TArrayUtilities.Fill<Byte>(LCekBlock, 0, System.Length(LCekBlock), Byte(0));
TArrayUtilities.Fill(LCekBlock, 0, System.Length(LCekBlock), Byte(0));

if (LNonEqual <> 0) or LInvalidLength then
raise EInvalidCipherTextCryptoLibException.CreateRes(@SWrappedKeyCorrupted);
Expand Down
4 changes: 2 additions & 2 deletions CryptoLib/src/Crypto/Engines/ClpRijndaelEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ function TRijndaelEngine.GenerateWorkingKey(const AKey: TCryptoLibByteArray)
LKc := 8
else
begin
TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
raise EArgumentCryptoLibException.CreateRes(@SInvalidKeyLength);
end;
end;
Expand Down Expand Up @@ -653,7 +653,7 @@ function TRijndaelEngine.GenerateWorkingKey(const AKey: TCryptoLibByteArray)
end;
Result := LW;

TArrayUtilities.Fill<Byte>(AKey, 0, System.Length(AKey), Byte(0));
TArrayUtilities.Fill(AKey, 0, System.Length(AKey), Byte(0));
end;

procedure TRijndaelEngine.PackBlock(const ABytes: TCryptoLibByteArray;
Expand Down
14 changes: 7 additions & 7 deletions CryptoLib/src/Crypto/Engines/ClpSpeckEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ procedure TSpeckUInt32Engine.SetKey(const AKeyBytes: TCryptoLibByteArray);

end;

TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
end;

{ TSpeckUInt64Engine }
Expand Down Expand Up @@ -954,7 +954,7 @@ procedure TSpeckUInt64Engine.SetKey(const AKeyBytes: TCryptoLibByteArray);

end;

TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
end;

{ TSpeck32Engine }
Expand All @@ -976,7 +976,7 @@ procedure TSpeck32Engine.CheckKeySize(const AKeyBytes: TCryptoLibByteArray);
LKeyBytesSize := System.Length(AKeyBytes);
if (LKeyBytesSize <> 8) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt(@SSpeckInvalidKeySize,
['32', '64 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1001,7 +1001,7 @@ procedure TSpeck48Engine.CheckKeySize(const AKeyBytes: TCryptoLibByteArray);
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [9, 12]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt(@SSpeckInvalidKeySize,
['48', '72 or 96 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1026,7 +1026,7 @@ procedure TSpeck64Engine.CheckKeySize(const AKeyBytes: TCryptoLibByteArray);
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [12, 16]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt(@SSpeckInvalidKeySize,
['64', '96 or 128 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1051,7 +1051,7 @@ procedure TSpeck96Engine.CheckKeySize(const AKeyBytes: TCryptoLibByteArray);
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [12, 18]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt(@SSpeckInvalidKeySize,
['96', '96 or 144 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1076,7 +1076,7 @@ procedure TSpeck128Engine.CheckKeySize(const AKeyBytes: TCryptoLibByteArray);
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [16, 24, 32]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt(@SSpeckInvalidKeySize,
['128', '128, 192 or 256 bits', LKeyBytesSize * 8]);
end;
Expand Down
14 changes: 7 additions & 7 deletions CryptoLib/src/Crypto/Engines/ClpSpeckLegacyEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ procedure TSpeckUInt32LegacyEngine.SetKey(const AKeyBytes: TCryptoLibByteArray);

end;

TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
end;

{ TSpeckUInt64LegacyEngine }
Expand Down Expand Up @@ -958,7 +958,7 @@ procedure TSpeckUInt64LegacyEngine.SetKey(const AKeyBytes: TCryptoLibByteArray);

end;

TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
end;

{ TSpeck32LegacyEngine }
Expand All @@ -981,7 +981,7 @@ procedure TSpeck32LegacyEngine.CheckKeySize(const AKeyBytes
LKeyBytesSize := System.Length(AKeyBytes);
if (LKeyBytesSize <> 8) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt
(@SSpeckLegacyInvalidKeySize, ['32', '64 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1007,7 +1007,7 @@ procedure TSpeck48LegacyEngine.CheckKeySize(const AKeyBytes
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [9, 12]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt
(@SSpeckLegacyInvalidKeySize, ['48', '72 or 96 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1033,7 +1033,7 @@ procedure TSpeck64LegacyEngine.CheckKeySize(const AKeyBytes
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [12, 16]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt
(@SSpeckLegacyInvalidKeySize, ['64', '96 or 128 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1059,7 +1059,7 @@ procedure TSpeck96LegacyEngine.CheckKeySize(const AKeyBytes
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [12, 18]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt
(@SSpeckLegacyInvalidKeySize, ['96', '96 or 144 bits', LKeyBytesSize * 8]);
end;
Expand All @@ -1085,7 +1085,7 @@ procedure TSpeck128LegacyEngine.CheckKeySize(const AKeyBytes
LKeyBytesSize := System.Length(AKeyBytes);
if not(LKeyBytesSize in [16, 24, 32]) then
begin
TArrayUtilities.Fill<Byte>(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
TArrayUtilities.Fill(AKeyBytes, 0, System.Length(AKeyBytes), Byte(0));
raise EArgumentCryptoLibException.CreateResFmt
(@SSpeckLegacyInvalidKeySize, ['128', '128, 192 or 256 bits',
LKeyBytesSize * 8]);
Expand Down
Loading
Loading