Skip to main content

PlatformRsaUtils

Assembly: ServiceStack.Client.dll​
View Source​
Declaration
public static class PlatformRsaUtils

Methods​

FromXml(RSA, String)​

View Source​
Declaration
public static void FromXml(this RSA rsa, string xml)
Parameters​
TypeName
System.Security.Cryptography.RSArsa
System.Stringxml

ToXml(RSA, Boolean)​

View Source​
Declaration
public static string ToXml(this RSA rsa, bool includePrivateParameters)
Returns​

System.String

Parameters​
TypeName
System.Security.Cryptography.RSArsa
System.BooleanincludePrivateParameters

Encrypt(RSA, Byte[])​

View Source​
Declaration
public static byte[] Encrypt(this RSA rsa, byte[] bytes)
Returns​

System.Byte[]

Parameters​
TypeName
System.Security.Cryptography.RSArsa
System.Byte[]bytes

Decrypt(RSA, Byte[])​

View Source​
Declaration
public static byte[] Decrypt(this RSA rsa, byte[] bytes)
Returns​

System.Byte[]

Parameters​
TypeName
System.Security.Cryptography.RSArsa
System.Byte[]bytes

SignData(RSA, Byte[], String)​

View Source​
Declaration
public static byte[] SignData(this RSA rsa, byte[] bytes, string hashAlgorithm)
Returns​

System.Byte[]

Parameters​
TypeName
System.Security.Cryptography.RSArsa
System.Byte[]bytes
System.StringhashAlgorithm

VerifyData(RSA, Byte[], Byte[], String)​

View Source​
Declaration
public static bool VerifyData(this RSA rsa, byte[] bytes, byte[] signature, string hashAlgorithm)
Returns​

System.Boolean

Parameters​
TypeName
System.Security.Cryptography.RSArsa
System.Byte[]bytes
System.Byte[]signature
System.StringhashAlgorithm

ExtractFromXml(String)​

View Source​
Declaration
public static RSAParameters ExtractFromXml(string xml)
Returns​

System.Security.Cryptography.RSAParameters

Parameters​
TypeName
System.Stringxml

ExportToXml(RSAParameters, Boolean)​

View Source​
Declaration
public static string ExportToXml(RSAParameters csp, bool includePrivateParameters)
Returns​

System.String

Parameters​
TypeName
System.Security.Cryptography.RSAParameterscsp
System.BooleanincludePrivateParameters