C# 클래스 GonzoNet.Encryption.StaticStaticDiffieHellman

Contains methods for en/decryption and ex/importing keys. From: http://stackoverflow.com/questions/3196297/minimal-message-size-public-key-encryption-in-net
파일 보기 프로젝트 열기: Afr0Games/Project-Dollhouse 1 사용 예제들

공개 메소드들

메소드 설명
Decrypt ( System.Security.Cryptography.ECDiffieHellmanCng privateKey, System.Security.Cryptography.ECDiffieHellmanPublicKey publicKey, byte nonce, byte encryptedData ) : byte[]

Decrypts the provided data.

Encrypt ( System.Security.Cryptography.ECDiffieHellmanCng privateKey, System.Security.Cryptography.ECDiffieHellmanPublicKey publicKey, byte nonce, byte data ) : byte[]

Encrypts the provided data.

ExportKey ( string Path, System.Security.Cryptography.CngKey PrivateKey ) : void

Exports a private key.

ExportKey ( string Path, System.Security.Cryptography.ECDiffieHellmanPublicKey Key ) : void
ExportKey ( string Path, byte Key ) : void
ImportKey ( string Path ) : byte[]

Imports a key from a specified path.

비공개 메소드들

메소드 설명
DeriveKeyAndIv ( System.Security.Cryptography.ECDiffieHellmanCng privateKey, System.Security.Cryptography.ECDiffieHellmanPublicKey publicKey, byte nonce ) : Aes

메소드 상세

Decrypt() 공개 정적인 메소드

Decrypts the provided data.
public static Decrypt ( System.Security.Cryptography.ECDiffieHellmanCng privateKey, System.Security.Cryptography.ECDiffieHellmanPublicKey publicKey, byte nonce, byte encryptedData ) : byte[]
privateKey System.Security.Cryptography.ECDiffieHellmanCng The private key used for decryption.
publicKey System.Security.Cryptography.ECDiffieHellmanPublicKey The public key used for decryption.
nonce byte The nonce used for decryption.
encryptedData byte The data to decrypt.
리턴 byte[]

Encrypt() 공개 정적인 메소드

Encrypts the provided data.
public static Encrypt ( System.Security.Cryptography.ECDiffieHellmanCng privateKey, System.Security.Cryptography.ECDiffieHellmanPublicKey publicKey, byte nonce, byte data ) : byte[]
privateKey System.Security.Cryptography.ECDiffieHellmanCng The private key used for encryption.
publicKey System.Security.Cryptography.ECDiffieHellmanPublicKey The public key used for encryption.
nonce byte The nonce used for encryption.
data byte The data to encrypt.
리턴 byte[]

ExportKey() 공개 정적인 메소드

Exports a private key.
public static ExportKey ( string Path, System.Security.Cryptography.CngKey PrivateKey ) : void
Path string The path to export to.
PrivateKey System.Security.Cryptography.CngKey The key to export.
리턴 void

ExportKey() 공개 정적인 메소드

public static ExportKey ( string Path, System.Security.Cryptography.ECDiffieHellmanPublicKey Key ) : void
Path string
Key System.Security.Cryptography.ECDiffieHellmanPublicKey
리턴 void

ExportKey() 공개 정적인 메소드

public static ExportKey ( string Path, byte Key ) : void
Path string
Key byte
리턴 void

ImportKey() 공개 정적인 메소드

Imports a key from a specified path.
public static ImportKey ( string Path ) : byte[]
Path string The path of the key.
리턴 byte[]