Back to the Function Reference Table of Contents
Decryption Functions
- spgpDecode
Decrypt and/or verify text which has been public-key or conventionally (passphrase) encrypted.
- spgpDecodeFile
Decrypt and/or verify a file which has been public-key or conventionally (passphrase) encrypted.
Decrypt and/or verify text which has been public-key or conventionally (passphrase) encrypted.
Visual Basic declaration:
Declare Function spgpdecode Lib "spgp.dll" (
ByVal BufferIn As String,
ByVal BufferOut As String,
ByVal BufferOutLen As Long,
ByVal Pass As String,
ByVal SigProps As String
) As Long
Parameters:
BufferIn
|
A fixed-length string which will act as a buffer for input.
|
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).
|
Pass
|
Passphrase for conventional encryption or to access private key.
|
SigProps
|
Signature properties. See Signature Properties String.
|
Notes and Warnings:
- Because Pass holds the passphrase for either conventionally encrypted text or a private key, you must either (a) know in advance what type of encryption has been used, so that you can offer the correct passphrase, or (b) use the spgpAnalyzeEx function to determine whether the data is public-key or conventionally encrypted. (That function can also determine if the necessary decryption keys are available on the local key-ring.)
- A maximum of 256 bytes will be written to SigProps (255 characters + null).
- Binary input through a text buffer will almost certainly fail. Use files for binary input or output.
up to the top
Decrypt and/or verify a file which has been public-key or conventionally (passphrase) encrypted.
Visual Basic declaration:
Declare Function spgpdecodefile Lib "spgp.dll" (
ByVal FileIn As String,
ByVal FileOut As String,
ByVal Pass As String,
ByVal SigProps As String
) As Long
Parameters:
FileIn
|
Input file. This must be a complete path and file name.
|
FileOut
|
Output file. This must be a complete path and file name, and cannot be the same as FileIn.
|
Pass
|
Passphrase for conventional encryption or to access private key.
|
SigProps
|
Signature properties. See Signature Properties String.
|
Notes and Warnings:
- Because Pass holds the passphrase for either a conventionally encrypted file or a private key, you must either (a) know in advance what type of encryption has been used, so that you can offer the correct passphrase, or (b) use the spgpAnalyzeEx function to determine whether the data is public-key or conventionally encrypted. (That function can also determine if the necessary decryption keys are available on the local key-ring.)
- A maximum of 256 bytes will be written to SigProps (255 characters + null).
up to the top
Back to the Function Reference Table of Contents