|
@@ -177,7 +177,8 @@ type
|
|
|
implementation
|
|
|
|
|
|
uses
|
|
|
- UECIES, UCoreUtils, UConst, UOpTransaction, UAES, UFRMWalletKeys, UUserInterface, UPCDataTypes;
|
|
|
+ UPCEncryption,
|
|
|
+ UCoreUtils, UConst, UOpTransaction, UFRMWalletKeys, UUserInterface, UPCDataTypes;
|
|
|
|
|
|
{$R *.lfm}
|
|
|
|
|
@@ -1257,7 +1258,7 @@ begin
|
|
|
// Use sender
|
|
|
errors := 'Error encrypting';
|
|
|
account := FNode.GetAccount(SenderAccount.account);
|
|
|
- payload_encrypted := ECIESEncrypt(account.accountInfo.accountKey,TEncoding.ANSI.GetBytes(payload_u));
|
|
|
+ TPCEncryption.DoPascalCoinECIESEncrypt(account.accountInfo.accountKey,TEncoding.ANSI.GetBytes(payload_u), payload_encrypted);
|
|
|
valid := Length(payload_encrypted)>0;
|
|
|
end else if (rbEncryptedWithEC.Checked) then begin
|
|
|
errors := 'Error encrypting';
|
|
@@ -1293,7 +1294,7 @@ begin
|
|
|
exit;
|
|
|
end;
|
|
|
account := FNode.GetAccount(dest_account_number);
|
|
|
- payload_encrypted := ECIESEncrypt(account.accountInfo.accountKey,TEncoding.ANSI.GetBytes(payload_u));
|
|
|
+ TPCEncryption.DoPascalCoinECIESEncrypt(account.accountInfo.accountKey,TEncoding.ANSI.GetBytes(payload_u),payload_encrypted);
|
|
|
valid := Length(payload_encrypted)>0;
|
|
|
end else if (PageControlOpType.ActivePage=tsChangePrivateKey) then begin
|
|
|
if (rbChangeKeyWithAnother.Checked) then begin
|
|
@@ -1315,7 +1316,7 @@ begin
|
|
|
exit;
|
|
|
end;
|
|
|
if public_key.EC_OpenSSL_NID<>CT_Account_NUL.accountInfo.accountKey.EC_OpenSSL_NID then begin
|
|
|
- payload_encrypted := ECIESEncrypt(public_key,TEncoding.ANSI.GetBytes(payload_u));
|
|
|
+ TPCEncryption.DoPascalCoinECIESEncrypt(public_key,TEncoding.ANSI.GetBytes(payload_u),payload_encrypted);
|
|
|
valid := Length(payload_encrypted)>0;
|
|
|
end else begin
|
|
|
valid := false;
|
|
@@ -1326,7 +1327,7 @@ begin
|
|
|
errors := 'This operation does not allow this kind of payload';
|
|
|
end;
|
|
|
end else if (rbEncrptedWithPassword.Checked) then begin
|
|
|
- payload_encrypted := TAESComp.EVP_Encrypt_AES256(TEncoding.ANSI.GetBytes(payload_u),TEncoding.ANSI.GetBytes(ebEncryptPassword.Text));
|
|
|
+ payload_encrypted := TPCEncryption.DoPascalCoinAESEncrypt(TEncoding.ANSI.GetBytes(payload_u),TEncoding.ANSI.GetBytes(ebEncryptPassword.Text));
|
|
|
valid := Length(payload_encrypted)>0;
|
|
|
end else if (rbNotEncrypted.Checked) then begin
|
|
|
payload_encrypted := TEncoding.ANSI.GetBytes(payload_u);
|