Discuss this help topic in SecureBlackbox Forum

TElPGPKeyring.FindPublicKeyByEmailAddress

TElPGPKeyring     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Searches public key in the keyring by its e-mail address.

Declaration

[C#/Java]
    int FindPublicKeyByEmailAddress(string Address, int StartIndex /* = 0 */);

[VB.NET]
    Function FindPublicKeyByEmailAddress(ByVal Address As String, ByVal StartIndex As Integer = 0) As Integer

[Pascal]
    function FindPublicKeyByEmailAddress(const Address : string; StartIndex : integer = 0) : integer;

[C++]
    int32_t FindPublicKeyByEmailAddress(const std::string &Address, int32_t StartIndex);

[PHP]
    integer FindPublicKeyByEmailAddress(string $Address, integer $StartIndex)

Parameters

  • Address - the e-mail address to be found
  • StartIndex - index of the key from which the search must start.
    Default value is 0.

Return value

    Index of the found key or -1 if nothing was found.

Description

    Use this method when you need to find public key with specified e-mail address. Note, that some keys can have the same e-mail addresses. So you need to check that the key found is the one you've searched for, and if no, search again with new value of StartIndex parameter.
    Please also note, that this method searches for a given substring in the UserID information, so any substring of a user name can be used as a search criterion (not e-mail address only).

See also:     FindPublicKeyByID     FindSecretKeyByID     FindSecretKeyByEmailAddress    

Discuss this help topic in SecureBlackbox Forum