Recent

Author Topic: LockBox problem with verifying signed string  (Read 1896 times)

yahoo000

  • New Member
  • *
  • Posts: 20
LockBox problem with verifying signed string
« on: November 03, 2018, 05:43:40 pm »
Hello I got code to sign text with my generated private key (I'm using LockBox package), and then I want to verify text with generated signature using public key, but I do not know how to append signature and then verify this.. example code below

Code: Pascal  [Select][+][-]
  1. var
  2. lbDSA1 : TlbDSA;
  3. begin
  4.  
  5. lbDSA1 := lbDSA.create(nil);
  6. lbDSA1.KeySize := aks1024;
  7. lbDSA1.PublicKey.LoadFromStream(publickey);
  8.  
  9. if LbDSA1.VerifyString('text to verify')=true then showmessage('ok');
  10.  

I do not know how to append signature to LbDSA1, please help thank you.

yahoo000

  • New Member
  • *
  • Posts: 20
Re: LockBox problem with verifying signed string
« Reply #1 on: November 05, 2018, 05:54:37 pm »
found after 2 days..maybe it will help somebody looking for this..xD

just need to add this to procedure

Code: Pascal  [Select][+][-]
  1. procedure TForm1.LbRSASSA1GetSignature(Sender: TObject;
  2.   var Sig: TRSASignatureBlock);
  3. begin
  4.  HexToBuffer('signature_text', Sig, SizeOf(Sig));
  5. end;
  6.  

 

TinyPortal © 2005-2018