C# 클래스 Utilities.IO.Encryption.Default.RSA

RSA Encryptor
상속: Utilities.IO.Encryption.BaseClasses.AsymmetricBase
파일 보기 프로젝트 열기: JaCraig/Craig-s-Utility-Library

공개 메소드들

메소드 설명
Decrypt ( byte Input, string Key ) : byte[]

Decrypts a byte array using RSA

Encrypt ( byte Input, string Key ) : byte[]

Encrypts a string using RSA

SignHash ( string Input, string Key, string &Hash, Encoding EncodingUsing = null ) : string

Takes a string and creates a signed hash of it

VerifyHash ( string Hash, string SignedHash, string Key ) : bool

Verifies a signed hash against the unsigned version

보호된 메소드들

메소드 설명
GetProvider ( ) : AsymmetricAlgorithm

Gets the provider used

메소드 상세

Decrypt() 공개 메소드

Decrypts a byte array using RSA
public Decrypt ( byte Input, string Key ) : byte[]
Input byte /// Input byte array (should be small as anything over 128 bytes can not be decrypted) ///
Key string Key to use for decryption
리턴 byte[]

Encrypt() 공개 메소드

Encrypts a string using RSA
public Encrypt ( byte Input, string Key ) : byte[]
Input byte /// Input byte array (should be small as anything over 128 bytes can not be decrypted) ///
Key string Key to use for encryption
리턴 byte[]

GetProvider() 보호된 메소드

Gets the provider used
protected GetProvider ( ) : AsymmetricAlgorithm
리턴 System.Security.Cryptography.AsymmetricAlgorithm

SignHash() 공개 메소드

Takes a string and creates a signed hash of it
public SignHash ( string Input, string Key, string &Hash, Encoding EncodingUsing = null ) : string
Input string Input string
Key string Key to encrypt/sign with
Hash string This will be filled with the unsigned hash
EncodingUsing System.Text.Encoding Encoding that the input is using (defaults to UTF8)
리턴 string

VerifyHash() 공개 메소드

Verifies a signed hash against the unsigned version
public VerifyHash ( string Hash, string SignedHash, string Key ) : bool
Hash string The unsigned hash (should be 64bit string)
SignedHash string The signed hash (should be 64bit string)
Key string The key to use in decryption
리턴 bool