C# Class SharpTox.Encryption.ToxEncryption

Mostra file Open project: hexafluoride/Detox Class Usage Examples

Public Methods

Method Description
DecryptData ( byte data, ToxEncryptionKey key ) : byte[]
DecryptData ( byte data, ToxEncryptionKey key, ToxErrorDecryption &error ) : byte[]
EncryptData ( byte data, ToxEncryptionKey key ) : byte[]
EncryptData ( byte data, ToxEncryptionKey key, ToxErrorEncryption &error ) : byte[]
GetSalt ( byte data ) : byte[]
IsDataEncrypted ( byte data ) : bool

Private Methods

Method Description
DeriveKey ( string passphrase ) : ToxPassKey?
DeriveKey ( string passphrase, byte salt ) : ToxPassKey?

Method Details

DecryptData() public static method

public static DecryptData ( byte data, ToxEncryptionKey key ) : byte[]
data byte
key ToxEncryptionKey
return byte[]

DecryptData() public static method

public static DecryptData ( byte data, ToxEncryptionKey key, ToxErrorDecryption &error ) : byte[]
data byte
key ToxEncryptionKey
error ToxErrorDecryption
return byte[]

EncryptData() public static method

public static EncryptData ( byte data, ToxEncryptionKey key ) : byte[]
data byte
key ToxEncryptionKey
return byte[]

EncryptData() public static method

public static EncryptData ( byte data, ToxEncryptionKey key, ToxErrorEncryption &error ) : byte[]
data byte
key ToxEncryptionKey
error ToxErrorEncryption
return byte[]

GetSalt() public static method

public static GetSalt ( byte data ) : byte[]
data byte
return byte[]

IsDataEncrypted() public static method

public static IsDataEncrypted ( byte data ) : bool
data byte
return bool