Cypher for .net

BytesExtension..::..AsEncryptedBytes Method (String, X509Certificate2)

Asymmetrically encrypts text as encrypted bytes only use with small sets of text

Namespace:  System.Text
Assembly:  Walter.Cypher (in Walter.Cypher.dll)

Syntax


public static byte[] AsEncryptedBytes(
	string text,
	X509Certificate2 certificate
)

Parameters

text
Type: String
The text.
certificate
Type: X509Certificate2
The certificate.

Return Value

System.Byte[].

Remarks


Allowed size is dependent on the key size, for large strings use AsEncryptedBytes(String)