Prechádzať zdrojové kódy

fix some warnings and code cleanup

Ugochukwu Mmaduekwe 7 rokov pred
rodič
commit
b80535378a

+ 1 - 1
CryptoLib/src/Asn1/ClpDerPrintableString.pas

@@ -166,7 +166,7 @@ begin
       continue;
     end;
 
-    case IndexStr(ch, [''' ''', '\', '(', ')', '+', '-', '.', ':', '=', '?',
+    case IndexStr({$IFDEF FPC}UnicodeString{$ENDIF FPC}(ch), [''' ''', '\', '(', ')', '+', '-', '.', ':', '=', '?',
       '/', ',']) of
       0 .. 11:
         begin

+ 0 - 2
CryptoLib/src/Crypto/Engines/ClpPascalCoinIESEngine.pas

@@ -26,12 +26,10 @@ uses
   Classes,
   ClpIMac,
   ClpIPascalCoinIESEngine,
-  ClpIBufferedBlockCipher,
   ClpICipherParameters,
   ClpKeyParameter,
   ClpIKeyParameter,
   ClpParametersWithIV,
-  ClpIParametersWithIV,
   ClpIKeyParser,
   ClpIEphemeralKeyPair,
   ClpKDFParameters,

+ 0 - 1
CryptoLib/src/Crypto/Generators/ClpPascalCoinECIESKdfBytesGenerator.pas

@@ -28,7 +28,6 @@ uses
   ClpIDerivationParameters,
   ClpIKdfParameters,
   ClpIPascalCoinECIESKdfBytesGenerator,
-  ClpArrayUtils,
   ClpCryptoLibTypes;
 
 resourcestring

+ 0 - 1
CryptoLib/src/Crypto/Generators/ClpPkcs5S2ParametersGenerator.pas

@@ -31,7 +31,6 @@ uses
   ClpKeyParameter,
   ClpIKeyParameter,
   ClpParametersWithIV,
-  ClpIParametersWithIV,
   ClpParameterUtilities,
   ClpPbeParametersGenerator,
   ClpCryptoLibTypes;

+ 1 - 4
CryptoLib/src/Interfaces/ClpIECIESPublicKeyParser.pas

@@ -23,16 +23,13 @@ interface
 
 uses
   Classes,
-  ClpIKeyParser,
-  ClpIAsymmetricKeyParameter;
+  ClpIKeyParser;
 
 type
 
   IECIESPublicKeyParser = interface(IKeyParser)
     ['{7A948776-4DD9-4290-BCDF-EB96800AEAF6}']
 
-    function ReadKey(stream: TStream): IAsymmetricKeyParameter;
-
   end;
 
 implementation

+ 0 - 24
CryptoLib/src/Interfaces/ClpIPascalCoinECIESKdfBytesGenerator.pas

@@ -22,8 +22,6 @@ unit ClpIPascalCoinECIESKdfBytesGenerator;
 interface
 
 uses
-  ClpIDigest,
-  ClpIDerivationParameters,
   ClpIBaseKdfBytesGenerator,
   ClpCryptoLibTypes;
 
@@ -32,28 +30,6 @@ type
   IPascalCoinECIESKdfBytesGenerator = interface(IBaseKdfBytesGenerator)
     ['{F6C7D34B-BA6A-45DB-B2A2-088F36557396}']
 
-    function GetDigest(): IDigest;
-
-    procedure Init(const parameters: IDerivationParameters);
-
-    /// <summary>
-    /// return the underlying digest.
-    /// </summary>
-    property digest: IDigest read GetDigest;
-
-    /// <summary>
-    /// fill len bytes of the output buffer with bytes generated from the
-    /// derivation function.
-    /// </summary>
-    /// <exception cref="EArgumentCryptoLibException">
-    /// if the size of the request will cause an overflow.
-    /// </exception>
-    /// <exception cref="EDataLengthCryptoLibException">
-    /// if the out buffer is too small.
-    /// </exception>
-    function GenerateBytes(output: TCryptoLibByteArray;
-      outOff, length: Int32): Int32;
-
   end;
 
 implementation