C# 클래스 Cryptid.Crypto

This class contains all the general cryptographic functions for Cryptid
파일 보기 프로젝트 열기: CryptidID/Cryptid

공개 프로퍼티들

프로퍼티 타입 설명
CryptidSalt byte[]
CryptidSaltHash byte[]

공개 메소드들

메소드 설명
AES_Decrypt ( byte data, string password ) : byte[]

Decrypts a set of data with AES256 CBC. Passwords are hashed with SHA256 and then derived with RFC2898 to get the final key.

AES_Encrypt ( byte data, string password ) : byte[]

Encrypts a set of data with AES256 CBC. Passwords are hashed with SHA256 and then derived with RFC2898 to get the final key.

RSA_Sign ( byte data, RSAParameters privKey ) : byte[]

Signs a set of data with a provided RSA private key

RSA_Verify ( byte data, byte sig, RSAParameters pubKey ) : bool

Verifies an RSA signature for a set of data

Sha256D ( byte toHash ) : byte[]

Double hash a set of data with SHA256

비공개 메소드들

메소드 설명
AES_Decrypt ( byte bytesToBeDecrypted, byte passwordBytes ) : byte[]

Decrypts a set of data with AES256 CBC. Keys are derived with RFC2898.

AES_Encrypt ( byte bytesToBeEncrypted, byte passwordBytes ) : byte[]

Encrypts a set of data with AES256 CBC. Keys are derived with RFC2898.

메소드 상세

AES_Decrypt() 공개 정적인 메소드

Decrypts a set of data with AES256 CBC. Passwords are hashed with SHA256 and then derived with RFC2898 to get the final key.
public static AES_Decrypt ( byte data, string password ) : byte[]
data byte The data to decrypt
password string The password to decrypt the data
리턴 byte[]

AES_Encrypt() 공개 정적인 메소드

Encrypts a set of data with AES256 CBC. Passwords are hashed with SHA256 and then derived with RFC2898 to get the final key.
public static AES_Encrypt ( byte data, string password ) : byte[]
data byte The data to encrypt
password string The password to encrypt the data with
리턴 byte[]

RSA_Sign() 공개 정적인 메소드

Signs a set of data with a provided RSA private key
public static RSA_Sign ( byte data, RSAParameters privKey ) : byte[]
data byte The data to sign
privKey System.Security.Cryptography.RSAParameters The RSAParameters representing the private key
리턴 byte[]

RSA_Verify() 공개 정적인 메소드

Verifies an RSA signature for a set of data
public static RSA_Verify ( byte data, byte sig, RSAParameters pubKey ) : bool
data byte The data to verify
sig byte The signature to verify with
pubKey System.Security.Cryptography.RSAParameters The public key to use to verify
리턴 bool

Sha256D() 공개 정적인 메소드

Double hash a set of data with SHA256
public static Sha256D ( byte toHash ) : byte[]
toHash byte The data to hash
리턴 byte[]

프로퍼티 상세

CryptidSalt 공개적으로 정적으로 프로퍼티

The Cryptid salt
public static byte[] CryptidSalt
리턴 byte[]

CryptidSaltHash 공개적으로 정적으로 프로퍼티

A SHA256 hash of the Cryptid salt
public static byte[] CryptidSaltHash
리턴 byte[]