EncryptionUtility.EncryptText Method

Definition

Overloads

EncryptText(String, String, String)

Encrypt text string with an installed X509 certificate. Certificate store location is LocalMachine and the encryption algorithm is AES256 CBC.

EncryptText(String, String, String, StoreLocation, String)

Encrypt text string with an installed X509 certificate.

EncryptText(String, String, String)

Encrypt text string with an installed X509 certificate. Certificate store location is LocalMachine and the encryption algorithm is AES256 CBC.

public static string EncryptText (string textToEncrypt, string thumbprint, string storeName);
static member EncryptText : string * string * string -> string
Public Shared Function EncryptText (textToEncrypt As String, thumbprint As String, storeName As String) As String

Parameters

textToEncrypt
String

The text string to encrypt.

thumbprint
String

The thumbprint of encryption certificate.

storeName
String

The name of certificate store, from which encryption certificate is retrieved.

Returns

The encrypted text as String.

Applies to

EncryptText(String, String, String, StoreLocation, String)

Encrypt text string with an installed X509 certificate.

public static string EncryptText (string textToEncrypt, string thumbprint, string storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, string algorithmOid);
static member EncryptText : string * string * string * System.Security.Cryptography.X509Certificates.StoreLocation * string -> string
Public Shared Function EncryptText (textToEncrypt As String, thumbprint As String, storeName As String, storeLocation As StoreLocation, algorithmOid As String) As String

Parameters

textToEncrypt
String

The text to encrypt.

thumbprint
String

The thumbprint of encryption certificate.

storeName
String

The name of certificate store, from which encryption certificate is retrieved.

storeLocation
StoreLocation

The certificate store location to retrieve encryption certificate.

algorithmOid
String

The encryption algorithm object identifier (OID).

Returns

The encrypted text as String.

Applies to