Show / Hide Table of Contents

Class PEMCrypto

Inheritance
System.Object
PEMCrypto
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SecureExchangesSDK.Helpers
Assembly: SecureExchangesSDK.dll
Syntax
public class PEMCrypto

Methods

ExportPrivateKey(RSACryptoServiceProvider)

Export private (including public) key from MS RSACryptoServiceProvider into OpenSSH PEM string slightly modified from https://stackoverflow.com/a/23739932/2860309

Declaration
public static string ExportPrivateKey(RSACryptoServiceProvider csp)
Parameters
Type Name Description
System.Security.Cryptography.RSACryptoServiceProvider csp
Returns
Type Description
System.String

ExportPublicKey(RSACryptoServiceProvider)

Export public key from MS RSACryptoServiceProvider into OpenSSH PEM string slightly modified from https://stackoverflow.com/a/28407693

Declaration
public static string ExportPublicKey(RSACryptoServiceProvider csp)
Parameters
Type Name Description
System.Security.Cryptography.RSACryptoServiceProvider csp
Returns
Type Description
System.String

ImportPrivateKey(String)

Import OpenSSH PEM private key string into MS RSACryptoServiceProvider

Declaration
public static RSACryptoServiceProvider ImportPrivateKey(string pem)
Parameters
Type Name Description
System.String pem
Returns
Type Description
System.Security.Cryptography.RSACryptoServiceProvider

ImportPublicKey(String, RSACryptoServiceProvider)

Import OpenSSH PEM public key string into MS RSACryptoServiceProvider

Declaration
public static RSACryptoServiceProvider ImportPublicKey(string pem, RSACryptoServiceProvider csp)
Parameters
Type Name Description
System.String pem
System.Security.Cryptography.RSACryptoServiceProvider csp
Returns
Type Description
System.Security.Cryptography.RSACryptoServiceProvider

Extension Methods

ExtensionHelper.CopySameNameAndTypeProperties<T, S>(T, S)
In This Article
Back to top Generated by DocFX