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
Type | Name |
---|---|
System.Security.Cryptography.RSA | rsa |
System.String | xml |
ToXml(RSA, Boolean)
View Source
Declaration
public static string ToXml(this RSA rsa, bool includePrivateParameters)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Security.Cryptography.RSA | rsa |
System.Boolean | includePrivateParameters |
Encrypt(RSA, Byte[])
View Source
Declaration
public static byte[] Encrypt(this RSA rsa, byte[] bytes)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
System.Security.Cryptography.RSA | rsa |
System.Byte[] | bytes |
Decrypt(RSA, Byte[])
View Source
Declaration
public static byte[] Decrypt(this RSA rsa, byte[] bytes)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
System.Security.Cryptography.RSA | rsa |
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
Type | Name |
---|---|
System.Security.Cryptography.RSA | rsa |
System.Byte[] | bytes |
System.String | hashAlgorithm |
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
Type | Name |
---|---|
System.Security.Cryptography.RSA | rsa |
System.Byte[] | bytes |
System.Byte[] | signature |
System.String | hashAlgorithm |
ExtractFromXml(String)
View Source
Declaration
public static RSAParameters ExtractFromXml(string xml)
Returns
System.Security.Cryptography.RSAParameters
Parameters
Type | Name |
---|---|
System.String | xml |
ExportToXml(RSAParameters, Boolean)
View Source
Declaration
public static string ExportToXml(RSAParameters csp, bool includePrivateParameters)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Security.Cryptography.RSAParameters | csp |
System.Boolean | includePrivateParameters |