Browse Source

compatibility fix.

Ugochukwu Mmaduekwe 6 years ago
parent
commit
dfd78955fa
1 changed files with 2 additions and 6 deletions
  1. 2 6
      CryptoLib/src/Crypto/Signers/ClpDsaDigestSigner.pas

+ 2 - 6
CryptoLib/src/Crypto/Signers/ClpDsaDigestSigner.pas

@@ -140,9 +140,7 @@ begin
       (@SDsaDigestSignerNotInitializedForSignatureGeneration);
       (@SDsaDigestSignerNotInitializedForSignatureGeneration);
   end;
   end;
 
 
-  System.SetLength(hash, Fdigest.GetDigestSize);
-
-  Fdigest.DoFinal(hash, 0);
+  hash := Fdigest.GetUnderlyingIHash.TransformFinal().GetBytes();
 
 
   sig := Fdsa.GenerateSignature(hash);
   sig := Fdsa.GenerateSignature(hash);
 
 
@@ -224,9 +222,7 @@ begin
       (@SDsaDigestSignerNotInitializedForVerification);
       (@SDsaDigestSignerNotInitializedForVerification);
   end;
   end;
 
 
-  System.SetLength(hash, Fdigest.GetDigestSize);
-
-  Fdigest.DoFinal(hash, 0);
+  hash := Fdigest.GetUnderlyingIHash.TransformFinal().GetBytes();
 
 
   try
   try
     sig := Fencoding.Decode(GetOrder(), signature);
     sig := Fencoding.Decode(GetOrder(), signature);