 |
Certificate Request functions |
 |
x.509 functions |
 |
PKCS7 functions |
 |
RSA |
|
pkcs7_encrypt
Encrypt an S/MIME message
Syntax
Function pkcs7_encrypt (infile As String, outfile As String, recipcerts, [headers], [flags]) As Boolean
pkcs7_encrypt() takes the contents of the
file named infile and encrypts them using an
RC2 40-bit cipher so that they can only be read by the intended recipients
specified by recipcerts, which is either a
lone X.509 certificate, or an array of X.509 certificates. headers
is an array of headers that will be prepended to the data after it has been
encrypted. flags can be used to specify
options that affect the encoding process - see PKCS7
constants. headers can be either an
associative array keyed by header name, or an indexed array, where each element
contains a single header line.
Example
Set headers = CreateObject("Scripting.Dictionary")
headers.Add "Subject", "Secret message!"
ssl.pkcs7_encrypt "message.txt", "message.enc.txt",
Array("file://ca-cert.pem"), headers
|
|