CreaSign

CreaSign.EncryptMethod

Encrypts the specified data.

[VisualBasic]
PublicFunctionEncrypt( _
ByVal CertNameAsString,_
ByVal DataAsData,_
ByVal AlgorithmAsString_
)AsData

Parameters

CertName
The digital certificate, the public key of which is used for encryption. See also "Specifying the Signing Certificate".
Data
The data that should be encrypted.
Algorithm
The identifier of the symetric encryption algorithm.

Return Value

Encrypted data in PKCS#7 format or XML ducument encrypted using XML-ENC standard.

Remarks

The digital certificate specified in the CertName parameter must be installed in an appropriate certificate store. Its private key is not used in the encryption process. The data is first encrypted with a symmetric algorithm specified in the Algorithm parameter. The symmetric encryption key is then encrypted with the certificate's public key. The following symetric algorithms are supported:

XML_3DES-RSA can be used to encrypt XML file and the encrypted data is XML file encrypted using XML-ENC standard (http://www.w3.org/TR/xmlenc-core/#sec-eg-Element).

XML_3DES-RSA_BIN can be used to encrypt binary file and the encrypted data is XML file encrypted using XML-ENC standard (http://www.w3.org/TR/xmlenc-core/#sec-eg-Arbitrary-Data).

Requirements

Requires CreaSign Pro (not supported by CreaSign Lite).

See Also

CreaSign Class | CreaSign Namespace


Send comments on this topic.

(c) Crea 2002-2006