C# Class Shadowsocks.Encryption.IVEncryptor

Inheritance: Shadowsocks.Encryption.EncryptorBase
Mostra file Open project: shadowsocks/shadowsocks-windows

Protected Properties

Property Type Description
CipherInfo Shadowsocks.Encryption.EncryptorInfo
_cipher int
_decryptIV byte[]
_decryptIVReceived bool
_encryptIV byte[]
_encryptIVSent bool
_innerLibName string
_key byte[]
_method string
ciphers EncryptorInfo>.Dictionary
ivLen int
keyLen int
tempbuf byte[]

Public Methods

Method Description
Decrypt ( byte buf, int length, byte outbuf, int &outlength ) : void
Encrypt ( byte buf, int length, byte outbuf, int &outlength ) : void
IVEncryptor ( string method, string password, bool onetimeauth, bool isudp ) : System

Protected Methods

Method Description
OtaGetHeadLen ( byte buf, int length ) : int
bytesToKey ( byte password, byte key ) : void
cipherUpdate ( bool isCipher, int length, byte buf, byte outbuf ) : void
getCiphers ( ) : EncryptorInfo>.Dictionary
initCipher ( byte iv, bool isCipher ) : void
randBytes ( byte buf, int length ) : void

Private Methods

Method Description
InitKey ( string method, string password ) : void
OtaAuthBuffer ( byte buf, int &length ) : void
OtaAuthBuffer4Tcp ( byte buf, int &length ) : void
OtaAuthBuffer4Udp ( byte buf, int &length ) : void
OtaGenChunkHash ( byte buf, int offset, int len ) : byte[]
OtaGenHash ( byte msg, int msg_len ) : byte[]
OtaUpdateKeyBuffer ( ) : void

Method Details

Decrypt() public method

public Decrypt ( byte buf, int length, byte outbuf, int &outlength ) : void
buf byte
length int
outbuf byte
outlength int
return void

Encrypt() public method

public Encrypt ( byte buf, int length, byte outbuf, int &outlength ) : void
buf byte
length int
outbuf byte
outlength int
return void

IVEncryptor() public method

public IVEncryptor ( string method, string password, bool onetimeauth, bool isudp ) : System
method string
password string
onetimeauth bool
isudp bool
return System

OtaGetHeadLen() protected method

protected OtaGetHeadLen ( byte buf, int length ) : int
buf byte
length int
return int

bytesToKey() protected method

protected bytesToKey ( byte password, byte key ) : void
password byte
key byte
return void

cipherUpdate() protected abstract method

protected abstract cipherUpdate ( bool isCipher, int length, byte buf, byte outbuf ) : void
isCipher bool
length int
buf byte
outbuf byte
return void

getCiphers() protected abstract method

protected abstract getCiphers ( ) : EncryptorInfo>.Dictionary
return EncryptorInfo>.Dictionary

initCipher() protected method

protected initCipher ( byte iv, bool isCipher ) : void
iv byte
isCipher bool
return void

randBytes() protected static method

protected static randBytes ( byte buf, int length ) : void
buf byte
length int
return void

Property Details

CipherInfo protected_oe property

protected EncryptorInfo,Shadowsocks.Encryption CipherInfo
return Shadowsocks.Encryption.EncryptorInfo

_cipher protected_oe property

protected int _cipher
return int

_decryptIV protected_oe property

protected byte[] _decryptIV
return byte[]

_decryptIVReceived protected_oe property

protected bool _decryptIVReceived
return bool

_encryptIV protected_oe property

protected byte[] _encryptIV
return byte[]

_encryptIVSent protected_oe property

protected bool _encryptIVSent
return bool

_innerLibName protected_oe property

protected string _innerLibName
return string

_key protected_oe property

protected byte[] _key
return byte[]

_method protected_oe property

protected string _method
return string

ciphers protected_oe property

protected Dictionary ciphers
return EncryptorInfo>.Dictionary

ivLen protected_oe property

protected int ivLen
return int

keyLen protected_oe property

protected int keyLen
return int

tempbuf protected_oe static_oe property

protected static byte[] tempbuf
return byte[]