Browse Source

minor change to PascalCoinIESEngine

Ugochukwu Mmaduekwe 7 years ago
parent
commit
951e348072
1 changed files with 15 additions and 3 deletions
  1. 15 3
      CryptoLib/src/Crypto/Engines/ClpPascalCoinIESEngine.pas

+ 15 - 3
CryptoLib/src/Crypto/Engines/ClpPascalCoinIESEngine.pas

@@ -58,12 +58,24 @@ type
   TPascalCoinIESEngine = class(TIESEngine, IPascalCoinIESEngine)
   TPascalCoinIESEngine = class(TIESEngine, IPascalCoinIESEngine)
 
 
   strict private
   strict private
-  const
+  type
     /// <summary>
     /// <summary>
-    /// <b>SizeOf</b> Structure for Compatibility with PascalCoin Original
+    /// Structure for Compatibility with PascalCoin Original
     /// Implementation.
     /// Implementation.
     /// </summary>
     /// </summary>
-    SECURE_HEAD_SIZE = Int32(6);
+    TSecureHead = record
+      Key: Byte;
+      Mac: Byte;
+      Orig: UInt16;
+      Body: UInt16;
+    end;
+
+  const
+    /// <summary>
+    /// <b>SizeOf <paramref name="TSecureHead" /></b>. <br />
+    /// </summary>
+    // SECURE_HEAD_SIZE = Int32(6);
+    SECURE_HEAD_SIZE = System.SizeOf(TSecureHead);
 
 
   strict protected
   strict protected