Discuss this help topic in SecureBlackbox Forum


TElPGPKeyring     See also     

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

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


    int FindPublicKeyByEmailAddress(string Address, int StartIndex);

    Function FindPublicKeyByEmailAddress(ByVal Address As String, ByVal StartIndex As Integer) As Integer

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

    int32_t FindPublicKeyByEmailAddress(const std::string &Address, int32_t StartIndex);

    integer FindPublicKeyByEmailAddress(string $Address, integer $StartIndex)


  • 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.


    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