C# Class ServiceStack.CryptUtils

Useful .NET Encryption Utils from: https://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider(v=vs.110).aspx
Mostra file Open project: ServiceStack/ServiceStack Class Usage Examples

Public Methods

Method Description
CreatePublicAndPrivateKeyPair ( RsaKeyLengths rsaKeyLength = RsaKeyLengths.Bit2048 ) : RsaKeyPair
Decrypt ( string privateKeyXml, string encryptedData, RsaKeyLengths rsaKeyLength = RsaKeyLengths.Bit2048 ) : string
Encrypt ( string publicKeyXml, string data, RsaKeyLengths rsaKeyLength = RsaKeyLengths.Bit2048 ) : string

Method Details

CreatePublicAndPrivateKeyPair() public static method

public static CreatePublicAndPrivateKeyPair ( RsaKeyLengths rsaKeyLength = RsaKeyLengths.Bit2048 ) : RsaKeyPair
rsaKeyLength RsaKeyLengths
return RsaKeyPair

Decrypt() public static method

public static Decrypt ( string privateKeyXml, string encryptedData, RsaKeyLengths rsaKeyLength = RsaKeyLengths.Bit2048 ) : string
privateKeyXml string
encryptedData string
rsaKeyLength RsaKeyLengths
return string

Encrypt() public static method

public static Encrypt ( string publicKeyXml, string data, RsaKeyLengths rsaKeyLength = RsaKeyLengths.Bit2048 ) : string
publicKeyXml string
data string
rsaKeyLength RsaKeyLengths
return string