Browse Source

Update UPCEncryption.pas

Fixed bug on ECIES decryption
PascalCoin 6 years ago
parent
commit
9bbfa919ab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/UPCEncryption.pas

+ 1 - 1
src/core/UPCEncryption.pas

@@ -85,7 +85,7 @@ end;
 class function TPCEncryption.DoPascalCoinECIESDecrypt(const APrivateKeyInfo : TECPrivateKeyInfo; const AEncryptedMessage: TBytes; var ADecryptedMessage: TBytes): Boolean;
 begin
   {$IFDEF Use_OpenSSL}
-  Result := ECIESDecrypt(APrivateKeyInfo.EC_OpenSSL_NID,APrivateKeyInfo.RAW_PrivKey,False,AEncryptedMessage,ADecryptedMessage);
+  Result := ECIESDecrypt(APrivateKeyInfo.EC_OpenSSL_NID,APrivateKeyInfo.EC_KEY_Ptr,False,AEncryptedMessage,ADecryptedMessage);
   {$ELSE}
   Result := TPCCryptoLib4Pascal.DoPascalCoinECIESDecrypt(APrivateKeyInfo.EC_OpenSSL_NID,APrivateKeyInfo.RAW_PrivKey,AEncryptedMessage,ADecryptedMessage);
   {$ENDIF}