Browse Source

handled some overload issues

Ugochukwu Mmaduekwe 6 years ago
parent
commit
48a77ce403

+ 1 - 25
CryptoLib/src/Crypto/Parameters/ClpIESWithCipherParameters.pas

@@ -43,24 +43,6 @@ type
     function GetPointCompression: Boolean; inline;
   public
 
-    /// <summary>
-    /// Set the IES engine parameters.
-    /// </summary>
-    /// <param name="derivation">
-    /// the optional derivation vector for the KDF.
-    /// </param>
-    /// <param name="encoding">
-    /// the optional encoding vector for the KDF.
-    /// </param>
-    /// <param name="macKeySize">
-    /// the key size (in bits) for the MAC.
-    /// </param>
-    /// <param name="CipherKeySize">
-    /// the key size (in bits) for the block cipher.
-    /// </param>
-    constructor Create(const derivation, encoding: TCryptoLibByteArray;
-      macKeySize, CipherKeySize: Int32); overload;
-
     /// <summary>
     /// Set the IES engine parameters.
     /// </summary>
@@ -81,7 +63,7 @@ type
     /// </param>
     constructor Create(const derivation, encoding: TCryptoLibByteArray;
       macKeySize, CipherKeySize: Int32;
-      const nonce: TCryptoLibByteArray); overload;
+      const nonce: TCryptoLibByteArray = Nil); overload;
 
     /// <summary>
     /// Set the IES engine parameters.
@@ -152,12 +134,6 @@ begin
   Result := FusePointCompression;
 end;
 
-constructor TIESWithCipherParameters.Create(const derivation,
-  encoding: TCryptoLibByteArray; macKeySize, CipherKeySize: Int32);
-begin
-  Create(derivation, encoding, macKeySize, CipherKeySize, Nil);
-end;
-
 constructor TIESWithCipherParameters.Create(const derivation,
   encoding: TCryptoLibByteArray; macKeySize, CipherKeySize: Int32;
   const nonce: TCryptoLibByteArray);

+ 1 - 1
CryptoLib/src/Interfaces/ClpIDsaKeyParameters.pas

@@ -31,7 +31,7 @@ type
 
     function GetParameters: IDsaParameters;
 
-    function Equals(const other: IDsaKeyParameters): Boolean;
+    function Equals(const other: IDsaKeyParameters): Boolean; overload;
     property parameters: IDsaParameters read GetParameters;
 
   end;

+ 1 - 1
CryptoLib/src/Interfaces/ClpIDsaPrivateKeyParameters.pas

@@ -31,7 +31,7 @@ type
 
     function GetX: TBigInteger;
 
-    function Equals(const other: IDsaPrivateKeyParameters): Boolean;
+    function Equals(const other: IDsaPrivateKeyParameters): Boolean; overload;
     property X: TBigInteger read GetX;
 
   end;

+ 1 - 1
CryptoLib/src/Interfaces/ClpIDsaPublicKeyParameters.pas

@@ -28,7 +28,7 @@ type
 
     function GetY: TBigInteger;
 
-    function Equals(const other: IDsaPublicKeyParameters): Boolean;
+    function Equals(const other: IDsaPublicKeyParameters): Boolean; overload;
     property y: TBigInteger read GetY;
 
   end;

+ 2 - 0
CryptoLib/src/Interfaces/ClpIECKeyParameters.pas

@@ -35,6 +35,8 @@ type
     function GetPublicKeyParamSet: IDerObjectIdentifier;
     function GetParameters: IECDomainParameters;
 
+    function Equals(const other: IECKeyParameters): Boolean; overload;
+
     property AlgorithmName: String read GetAlgorithmName;
     property PublicKeyParamSet: IDerObjectIdentifier read GetPublicKeyParamSet;
     property Parameters: IECDomainParameters read GetParameters;

+ 1 - 0
CryptoLib/src/Interfaces/ClpIECPrivateKeyParameters.pas

@@ -30,6 +30,7 @@ type
   IECPrivateKeyParameters = interface(IECKeyParameters)
     ['{49066428-4021-4E3C-A9F5-AB2127289A67}']
 
+    function Equals(const other: IECPrivateKeyParameters): Boolean; overload;
     function GetD: TBigInteger;
     property D: TBigInteger read GetD;
   end;

+ 1 - 1
CryptoLib/src/Interfaces/ClpIECPublicKeyParameters.pas

@@ -30,8 +30,8 @@ type
   IECPublicKeyParameters = interface(IECKeyParameters)
     ['{4BABC163-847A-4FE2-AA16-5CD100F76124}']
 
+    function Equals(const other: IECPublicKeyParameters): Boolean; overload;
     function GetQ: IECPoint;
-
     property Q: IECPoint read GetQ;
   end;
 

+ 1 - 0
CryptoLib/src/Security/ClpCipherUtilities.pas

@@ -217,6 +217,7 @@ begin
   parts := TStringUtils.SplitString(algorithm, '/');
 
   blockCipher := Nil;
+  streamCipher := Nil;
 
   algorithmName := parts[0];