|
|
@@ -146,8 +146,8 @@ type
|
|
|
/// This code is written assuming those are the only possible values
|
|
|
/// </para>
|
|
|
/// </summary>
|
|
|
- function GenerateWorkingKey(const key: TCryptoLibByteArray;
|
|
|
- forEncryption: Boolean): TCryptoLibMatrixUInt32Array;
|
|
|
+ function GenerateWorkingKey(forEncryption: Boolean;
|
|
|
+ const key: TCryptoLibByteArray): TCryptoLibMatrixUInt32Array;
|
|
|
|
|
|
procedure UnPackBlock(const bytes: TCryptoLibByteArray; off: Int32); inline;
|
|
|
procedure PackBlock(const bytes: TCryptoLibByteArray; off: Int32); inline;
|
|
|
@@ -412,8 +412,8 @@ begin
|
|
|
xor ((UInt32(Si[(lr0 shr 24) and 255])) shl 24) xor lkw[3];
|
|
|
end;
|
|
|
|
|
|
-function TAesLightEngine.GenerateWorkingKey(const key: TCryptoLibByteArray;
|
|
|
- forEncryption: Boolean): TCryptoLibMatrixUInt32Array;
|
|
|
+function TAesLightEngine.GenerateWorkingKey(forEncryption: Boolean;
|
|
|
+ const key: TCryptoLibByteArray): TCryptoLibMatrixUInt32Array;
|
|
|
var
|
|
|
keyLen, KC, i, j: Int32;
|
|
|
smallw: TCryptoLibUInt32Array;
|
|
|
@@ -650,7 +650,7 @@ begin
|
|
|
[(parameters as TObject).ToString]);
|
|
|
end;
|
|
|
|
|
|
- FWorkingKey := GenerateWorkingKey(keyParameter.GetKey(), forEncryption);
|
|
|
+ FWorkingKey := GenerateWorkingKey(forEncryption, keyParameter.GetKey());
|
|
|
|
|
|
FforEncryption := forEncryption;
|
|
|
end;
|