C# 클래스 OpenSSL.Crypto.CipherContext

Wraps the EVP_CIPHER_CTX object.
상속: OpenSSL.Core.Base, IDisposable
파일 보기 프로젝트 열기: langhuihui/csharprtmp 1 사용 예제들

공개 메소드들

메소드 설명
BytesToKey ( OpenSSL.Crypto.MessageDigest md, byte salt, byte data, int count, byte &iv ) : byte[]

Calls EVP_BytesToKey

CipherContext ( Cipher cipher ) : System

Calls OPENSSL_malloc() and initializes the buffer using EVP_CIPHER_CTX_init()

Crypt ( byte input, byte key, byte iv, bool doEncrypt ) : byte[]

Encrypts or decrypts the specified payload.

Crypt ( byte input, byte key, byte iv, bool doEncrypt, int padding ) : byte[]

Calls EVP_CipherInit_ex(), EVP_CipherUpdate(), and EVP_CipherFinal_ex()

Crypt ( byte input, int count, byte key, byte iv, bool doEncrypt, int padding ) : byte[]

Calls EVP_CipherInit_ex(), EVP_CipherUpdate(), and EVP_CipherFinal_ex()

Decrypt ( byte input, byte key, byte iv ) : byte[]

Decrypts the specified ciphertext

Decrypt ( byte input, byte key, byte iv, int padding ) : byte[]

Decrypts the specified ciphertext

Encrypt ( byte input, byte key, byte iv ) : byte[]

Encrypts the specified plaintext

Encrypt ( byte input, byte key, byte iv, int padding ) : byte[]

Encrypts the specified plaintext

Open ( byte input, byte ekey, byte iv, OpenSSL.Crypto.CryptoKey pkey ) : byte[]

Calls EVP_OpenInit() and EVP_OpenFinal()

Print ( BIO bio ) : void

Returns the cipher's LongName

Seal ( OpenSSL.Crypto.CryptoKey pkeys, byte input ) : Envelope

Calls EVP_SealInit() and EVP_SealFinal()

보호된 메소드들

메소드 설명
OnDispose ( ) : void

Calls EVP_CIPHER_CTX_clean() and then OPENSSL_free()

비공개 메소드들

메소드 설명
SetupIV ( byte iv ) : byte[]
SetupKey ( byte key ) : byte[]

메소드 상세

BytesToKey() 공개 메소드

Calls EVP_BytesToKey
public BytesToKey ( OpenSSL.Crypto.MessageDigest md, byte salt, byte data, int count, byte &iv ) : byte[]
md OpenSSL.Crypto.MessageDigest
salt byte
data byte
count int
iv byte
리턴 byte[]

CipherContext() 공개 메소드

Calls OPENSSL_malloc() and initializes the buffer using EVP_CIPHER_CTX_init()
public CipherContext ( Cipher cipher ) : System
cipher Cipher
리턴 System

Crypt() 공개 메소드

Encrypts or decrypts the specified payload.
public Crypt ( byte input, byte key, byte iv, bool doEncrypt ) : byte[]
input byte
key byte
iv byte
doEncrypt bool
리턴 byte[]

Crypt() 공개 메소드

Calls EVP_CipherInit_ex(), EVP_CipherUpdate(), and EVP_CipherFinal_ex()
public Crypt ( byte input, byte key, byte iv, bool doEncrypt, int padding ) : byte[]
input byte
key byte
iv byte
doEncrypt bool
padding int
리턴 byte[]

Crypt() 공개 메소드

Calls EVP_CipherInit_ex(), EVP_CipherUpdate(), and EVP_CipherFinal_ex()
public Crypt ( byte input, int count, byte key, byte iv, bool doEncrypt, int padding ) : byte[]
input byte
count int
key byte
iv byte
doEncrypt bool
padding int
리턴 byte[]

Decrypt() 공개 메소드

Decrypts the specified ciphertext
public Decrypt ( byte input, byte key, byte iv ) : byte[]
input byte
key byte
iv byte
리턴 byte[]

Decrypt() 공개 메소드

Decrypts the specified ciphertext
public Decrypt ( byte input, byte key, byte iv, int padding ) : byte[]
input byte
key byte
iv byte
padding int
리턴 byte[]

Encrypt() 공개 메소드

Encrypts the specified plaintext
public Encrypt ( byte input, byte key, byte iv ) : byte[]
input byte
key byte
iv byte
리턴 byte[]

Encrypt() 공개 메소드

Encrypts the specified plaintext
public Encrypt ( byte input, byte key, byte iv, int padding ) : byte[]
input byte
key byte
iv byte
padding int
리턴 byte[]

OnDispose() 보호된 메소드

Calls EVP_CIPHER_CTX_clean() and then OPENSSL_free()
protected OnDispose ( ) : void
리턴 void

Open() 공개 메소드

Calls EVP_OpenInit() and EVP_OpenFinal()
public Open ( byte input, byte ekey, byte iv, OpenSSL.Crypto.CryptoKey pkey ) : byte[]
input byte
ekey byte
iv byte
pkey OpenSSL.Crypto.CryptoKey
리턴 byte[]

Print() 공개 메소드

Returns the cipher's LongName
public Print ( BIO bio ) : void
bio OpenSSL.Core.BIO
리턴 void

Seal() 공개 메소드

Calls EVP_SealInit() and EVP_SealFinal()
public Seal ( OpenSSL.Crypto.CryptoKey pkeys, byte input ) : Envelope
pkeys OpenSSL.Crypto.CryptoKey
input byte
리턴 Envelope