Skip to end of metadata
Go to start of metadata

Declaration

Delphi

procedure OnGetAesKey(Hash: OleVariant; out AesKey: OleVariant; out Succeeded: WordBool);

ActiveX

HRESULT OnGetAesKey([in] VARIANT Hash, [out] VARIANT* AesKey, [out] VARIANT_BOOL* Succeeded);

 

Description

This function should provide the preliminary document hash to the device driver, then read the encrypted AES key and return it to the API.

Samples

C#
void axSignApi4_OnGetAesKey(object sender, IStepOverSignatureAPIv4Events_OnGetAesKeyEvent e)
{    
	if (SigDev.SetPreliminaryDocumentHash(e.hash))    
	{        
		e.aesKey = SigDev.GetEncryptedAesKey();        
		e.succeeded = true;    
	}    
	else    
	{        
		e.aesKey = null;
	        e.succeeded = false;    
	}
}
VB.net
Private Sub signapi4_OnGetAesKey(ByVal Hash As Object, ByVal AesKey As Object, ByVal Succeeded As Boolean)
        If mSignaturDevice.SetPreliminaryDocumentHash(Hash) Then
            AesKey = mSignaturDevice.GetEncryptedAesKey
            Succeeded = True
        Else
            AesKey = ""
            Succeeded = False
        End If
End Sub
Delphi
procedure TFormMain.SignApiGetAesKey(Sender: TObject; Hash: OleVariant;   
	out AesKey: OleVariant; out Succeeded: WordBool); 
begin  if StepOverSignatureDevice1.SetPreliminaryDocumentHash(Hash) then begin
   AesKey := StepOverSignatureDevice1.GetEncryptedAesKey();
   Succeeded := True;
  end else begin
   AesKey := vaNil;
   Succeeded := False;
  end;
 end; 
VB6
Private Sub signapi4_OnGetAesKey(ByVal Hash As Variant, AesKey As Variant, Succeeded As Boolean)
If sigdev.SetPreliminaryDocumentHash(Hash) Then
          AesKey = sigdev.GetEncryptedAesKey
          Succeeded = True
Else
          AesKey = Null
          Succeeded = False
End If
End Sub
  • No labels