소스 검색

Update UPCEncryption.pas

Fixed bug on ECIES decryption
PascalCoin 6 년 전
부모
커밋
9bbfa919ab
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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}