Back to the Function Reference Table of Contents

Key-Properties Functions


spgpKeyProps

Extract the properties of a key or keys.

Visual Basic declaration:

Declare Function spgpkeyprops Lib "spgp.dll" (
	ByVal KeyID As String, 
	ByVal KeyProps As String, 
	ByVal KeyPropsLen As Long
	) As Long

Parameters:
KeyID Target key ID, which can be either the e-mail address from the key's user-ID or the ID number of the key itself, which must be prefixed by "0x".
KeyProps Properties of the target key. See Key Properties String.
KeyPropsLen Size of KeyProps. If output exceeds KeyPropsLen the output will be discarded and the function will return a positive number indicating the size of the output (i.e. the buffer size necessary to hold it).

Notes and Warnings:

up to the top

spgpKeyRingID

Extract the ID strings of all the keys on the default key-ring.

Visual Basic declaration:

Declare Function spgpkeyringid Lib "spgp.dll" (
	ByVal BufferOut As String, 
	ByVal BufferOutLen As Long
	) As Long

BufferOut A fixed-length string which will act as a buffer for output.
BufferOutLen Size of BufferOut. If output exceeds BufferOutLen the output will be discarded and the function will return a positive number indicating the size of the output (i.e. the buffer size necessary to hold it).

Notes and Warnings:

up to the top

spgpKeyRingToFile

Extract the properties of all the keys on the default key-ring and save them to a text file.

Visual Basic declaration:

Declare Function spgpkeyringtofile Lib "spgp.dll" (
        ByVal FileOut As String
        ) As Long

FileOut Output file. This must be a complete path and file name.

Notes and Warnings:

up to the top

spgpKeyRingCount

Returns the number of keys on the default key-ring.

Visual Basic declaration:

Declare Function spgpkeyringcount Lib "spgp.dll" () As Long

Notes and Warnings:

up to the top

spgpKeyIsOnRing

Verifies the presence of a key on the default key-rings.

Visual Basic declaration:

Declare Function spgpkeyisonring Lib "spgp.dll" (
        ByVal KeyID As String
        ) As Long

Parameters:
KeyID The key to search for. The ID may be either a Key ID (e.g. 0x123456) or a User ID enclosed in angle brackets (e.g. <test@test.com>). Unlike the other functions taking Key IDs as parameters, this function accepts only one ID at a time.

Notes and Warnings:

up to the top

spgpKeyPropUserID

Extracts all the user IDs from a key.

Visual Basic declaration:

Declare Function spgpkeypropuserid Lib "spgp.dll" (
	ByVal KeyID As String, 
	ByVal BufferOut As String, 
	ByVal BufferOutLen As Long
	) As Long

Parameters:
KeyID Target key's key ID, which can be either the e-mail address from the key's User ID or the ID number of the key itself, which must be prefixed by "0x".
BufferOut A fixed-length string which will act as a buffer for output.
BufferOutLen Size of BufferOut. If output exceeds BufferOutLen the output will be discarded and the function will return a positive number indicating the size of the output (i.e. the buffer size necessary to hold it).

Notes and Warnings:

up to the top

spgpKeyPropSig

Extracts the key ID from the signature(s) on a key's User ID.

Visual Basic declaration:

Declare Function spgpkeypropsig Lib "spgp.dll" (
	ByVal UserID As String, 
	ByVal BufferOut As String, 
	ByVal BufferOutLen As Long
	) As Long

Parameters:
UserID Target user ID, which must be a complete User ID, i.e., name and e-mail address.
BufferOut A fixed-length string which will act as a buffer for output.
BufferOutLen Size of BufferOut. If output exceeds BufferOutLen the output will be discarded and the function will return a positive number indicating the size of the output (i.e. the buffer size necessary to hold it).

Notes and Warnings:

up to the top

spgpKeyPropADK

Extracts the properties of a key's Additional Decryption Key(s), if any.

Visual Basic declaration:

Declare Function spgpkeypropadk Lib "spgp.dll" (
        ByVal KeyHexID As String, 
        ByVal ADKProps As String, 
        ByVal ADKPropsLen As Long, 
        ADKCount As Long, 
        ByVal Flags As Long
        ) As Long

Parameters:
KeyHexID Target Key, which must be a Hex ID.
ADKProps A fixed-length string which will act as a buffer for output (i.e., the properties of the ADK).
ADKPropsLen Size of ADKProps. If output exceeds ADKPropsLen the output will be discarded and the function will return a positive number indicating the size of the output (i.e. the buffer size necessary to hold it).
ADKCount The number of Additional Decryption Keys found.
Flags Bit-flags indicating which key properties to return. See the Notes below for details on the format of the output.

Notes and Warnings:

up to the top

spgpKeyPropRevocationKey

Extracts the properties of a key's designated revocation key(s), if any.

Visual Basic declaration:

Declare Function spgpkeyproprevocationkey Lib "spgp.dll" (
        ByVal KeyHexID As String, 
        ByVal RevKeyProps As String, 
        ByVal RevKeyPropsLen As Long, 
        RevKeyCount As Long, 
        ByVal Flags As Long
        ) As Long

Parameters:
KeyHexID Target Key, which must be a Hex ID.
RevKeyProps A fixed-length string which will act as a buffer for output (i.e., the properties of the revocation key).
RevKeyPropsLen Size of RevKeysProps. If output exceeds RevKeyPropsLen the output will be discarded and the function will return a positive number indicating the size of the output (i.e. the buffer size necessary to hold it).
RevKeyCount The number of revocation keys found.
Flags Bit-flags indicating which key properties to return.

Notes and Warnings:


Back to the Function Reference Table of Contents