Visual Basic declaration:
Declare Function spgpkeyexport Lib "spgp.dll" ( ByVal KeyID As String, ByVal BufferOut As String, ByVal BufferOutLen As Long, ByVal ExportPrivate As Long ByVal ExportCompatible as Long ) As Long
Parameters:
KeyID | The ID of the key to export, which can be either the e-mail address from the key's user-ID or the HexID, 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). |
ExportPrivate | Export private keys & signatures? May be 0 (false) or 1 (true). If false, only the indicated public key will be exported, without exportable signatures. If true, and a private key is available, two key blocks will be exported: a private-key block and a public-key block which includes any exportable signatures. This is the default behavior of the PGPsdk, it is not the author's idea. |
ExportCompatible (PGP 6 only) | Export in compatible format? May be 0 (false) or 1 (true). If true, the key or keys will be exported in a format compatible with older versions of PGP. If false, any PGP 6.x extensions (e.g. photographs) will be included. This parameter has no effect when used with versions earlier then 6.0. |
Notes and Warnings:
Visual Basic declaration:
Declare Function spgpkeyexportfile Lib "spgp.dll" ( ByVal KeyID As String, ByVal FileOut As String, ByVal ExportPrivate As Long ByVal ExportCompatible As Long ) As Long
Parameters:
KeyID | The ID of the key to export, which can be either the e-mail address from the key's user-ID or the HexID, which must be prefixed by "0x". |
FileOut | File for output. This must be a full path and file name. |
ExportPrivate | Export private keys & signatures? May be 0 (false) or 1 (true). If false, only the indicated public key will be exported, without exportable signatures. If true, and a private key is available, two key blocks will be exported: a private-key block and a public-key block which includes any exportable signatures. This is the default behavior of the PGPsdk; it is not the author's idea. |
ExportCompatible (PGP 6 only) | Export in compatible format? May be 0 (false) or 1 (true). If true, the key or keys will be exported in a format compatible with older versions of PGP. If false, any PGP 6.x extensions (e.g. photographs) will be included. This parameter has no effect when used with versions earlier then 6.0. |
Notes and Warnings:
Visual Basic declaration:
Declare Function spgp_keyimport Lib "spgp.dll" ( ByVal BufferIn As String, ByVal KeyProps As String, ByVal KeyPropsLen As Long, ByVal Import As Long, ByVal AllProps As Long ) As Long
Parameters:
BufferIn | A fixed-length string which will act as a buffer for input. |
KeyProps | Properties of the successfully imported key or keys. |
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). |
Import | Import Keys? May be 1 (true) or 0 (false). If false, keys found in BufferIn will not be imported to the local ring, but their properties will still be returned by KeyProps. If true, the keys will be imported. |
AllProps | Report All Key-Properties? May be 1 (true) or 0 (false). If false, KeyProps will contain the abbreviated key-properties string described below. If true, a complete key-properties string will be used. |
Notes and Warnings:
Visual Basic declaration:
Declare Function spgp_keyimportfile Lib "spgp.dll" ( ByVal FileIn As String, ByVal KeyProps As String, ByVal KeyPropsLen As Long, ByVal Import As Long, ByVal AllProps As Long ) As Long
Parameters:
FileIn | File containing the key or keys to be imported. This must be a full path and file name. |
KeyProps | Properties of the successfully imported key or keys. 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). |
Import | Import Keys? May be 1 (true) or 0 (false). If false, keys found in BufferIn will not be imported to the local ring, but their properties will still be returned by KeyProps. If true, the keys will be imported. |
AllProps | Report All Key-Properties? May be 1 (true) or 0 (false). If false, KeyProps will contain the abbreviated key-properties string described below. If true, a complete key-properties string will be used. |
Notes and Warnings: