StringExtensionsEncrypt Method
Encrypt a string using the supplied key. Encoding is done using RSA encryption.
Namespace: PCBI_CadanceFab_ImportAssembly: PCBI_CadanceFab_Import (in PCBI_CadanceFab_Import.dll) Version: 16.0.0.0 (16.0.0.0)
public static string Encrypt(
this string stringToEncrypt,
string key
)
<ExtensionAttribute>
Public Shared Function Encrypt (
stringToEncrypt As String,
key As String
) As String
public:
[ExtensionAttribute]
static String^ Encrypt(
String^ stringToEncrypt,
String^ key
)
[<ExtensionAttribute>]
static member Encrypt :
stringToEncrypt : string *
key : string -> string
- stringToEncrypt String
- String that must be encrypted.
- key String
- Encryption key
StringA string representing a byte array separated by a minus sign.In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
ArgumentException | Occurs when stringToEncrypt or key is null or empty. |