C# 클래스 Example.Example.RsaCryptoServiceProviderExtension

Extension method for initializing a RSACryptoServiceProvider from PEM data string.
파일 보기 프로젝트 열기: PingPlusPlus/pingpp-csharp

공개 메소드들

메소드 설명
LoadPrivateKeyDer ( this provider, byte derData ) : void

Extension method which initializes an RSACryptoServiceProvider from a DER private key blob.

LoadPrivateKeyPem ( this provider, string sPem ) : void

Extension method which initializes an RSACryptoServiceProvider from a PEM private key string.

LoadPublicKeyDer ( this provider, byte derData ) : void

Extension method which initializes an RSACryptoServiceProvider from a DER public key blob.

LoadPublicKeyPem ( this provider, string sPem ) : void

Extension method which initializes an RSACryptoServiceProvider from a PEM public key string.

비공개 메소드들

메소드 설명
CryptAcquireContext ( IntPtr &hProv, string pszContainer, string pszProvider, CRYPT_PROVIDER_TYPE dwProvType, CRYPT_ACQUIRE_CONTEXT_FLAGS dwFlags ) : bool
CryptDecodeObject ( CRYPT_ENCODING_FLAGS dwCertEncodingType, IntPtr lpszStructType, byte pbEncoded, UInt32 cbEncoded, CRYPT_DECODE_FLAGS flags, [ pvStructInfo, UInt32 &cbStructInfo ) : bool
CryptDecodeObjectEx ( CRYPT_ENCODING_FLAGS dwCertEncodingType, IntPtr lpszStructType, byte pbEncoded, UInt32 cbEncoded, CRYPT_DECODE_FLAGS dwFlags, IntPtr pDecodePara, byte &pvStructInfo, UInt32 &pcbStructInfo ) : bool
CryptDestroyKey ( IntPtr hKey ) : bool
CryptImportKey ( IntPtr hProv, byte pbKeyData, UInt32 dwDataLen, IntPtr hPubKey, UInt32 dwFlags, IntPtr &hKey ) : bool
CryptReleaseContext ( IntPtr hProv, Int32 dwFlags ) : bool
CryptStringToBinary ( string sPem, UInt32 sPemLength, CRYPT_STRING_FLAGS dwFlags, [ pbBinary, UInt32 &pcbBinary, UInt32 &pdwSkip, UInt32 &pdwFlags ) : bool
GetDerFromPem ( string sPEM ) : byte[]

Extracts the binary data from a PEM file.

GetPrivateKeyDer ( byte derData ) : byte[]

Converts DER binary format to a CAPI CRYPT_PRIVATE_KEY_INFO structure.

GetPublicKeyBlobFromRsa ( byte rsaData ) : byte[]

Returns a public key blob from an RSA public key.

GetRsaFromDer ( byte derData ) : byte[]

Converts DER binary format to a CAPI CERT_PUBLIC_KEY_INFO structure containing an RSA key.

메소드 상세

LoadPrivateKeyDer() 공개 정적인 메소드

Extension method which initializes an RSACryptoServiceProvider from a DER private key blob.
public static LoadPrivateKeyDer ( this provider, byte derData ) : void
provider this
derData byte
리턴 void

LoadPrivateKeyPem() 공개 정적인 메소드

Extension method which initializes an RSACryptoServiceProvider from a PEM private key string.
public static LoadPrivateKeyPem ( this provider, string sPem ) : void
provider this
sPem string
리턴 void

LoadPublicKeyDer() 공개 정적인 메소드

Extension method which initializes an RSACryptoServiceProvider from a DER public key blob.
public static LoadPublicKeyDer ( this provider, byte derData ) : void
provider this
derData byte
리턴 void

LoadPublicKeyPem() 공개 정적인 메소드

Extension method which initializes an RSACryptoServiceProvider from a PEM public key string.
public static LoadPublicKeyPem ( this provider, string sPem ) : void
provider this
sPem string
리턴 void