C# 클래스 Tpm2Lib.SymmCipher

A helper class for doing symmetric cryptography based on TPM structure definitions.
상속: IDisposable
파일 보기 프로젝트 열기: Microsoft/TSS.MSR 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
LimitedSupport bool

공개 메소드들

메소드 설명
Create ( SymDefObject symDef = null, byte keyData = null, byte iv = null ) : SymmCipher

Create a new SymmCipher object with a random key based on the alg and mode supplied.

CreateFromPublicParms ( IPublicParmsUnion parms ) : SymmCipher
Decrypt ( SymDefObject symDef, byte key, byte iv, byte dataToDecrypt ) : byte[]
Decrypt ( byte data, byte iv = null ) : byte[]
Dispose ( ) : void
Encrypt ( SymDefObject symDef, byte key, byte iv, byte dataToEncrypt ) : byte[]
Encrypt ( byte data, byte iv = null ) : byte[]

Performs the TPM-defined CFB encrypt using the associated algorithm. This routine assumes that the integrity value has been prepended.

GetBlockSize ( SymDefObject symDef ) : int
GetCipherMode ( TpmAlgId cipherMode ) : CipherMode
SensitiveFromDuplicateBlob ( TpmPrivate exportedPrivate, SymDefObject encAlg, byte encKey, TpmAlgId nameAlg, byte name ) : Sensitive

De-envelope inner-wrapped duplication blob. TODO: Move this to TpmPublic and make it fully general

비공개 메소드들

메소드 설명
SymmCipher ( BCryptKey key, byte keyData, byte iv ) : System
SymmCipher ( SymmetricAlgorithm alg ) : System

메소드 상세

Create() 공개 정적인 메소드

Create a new SymmCipher object with a random key based on the alg and mode supplied.
public static Create ( SymDefObject symDef = null, byte keyData = null, byte iv = null ) : SymmCipher
symDef SymDefObject
keyData byte
iv byte
리턴 SymmCipher

CreateFromPublicParms() 공개 정적인 메소드

public static CreateFromPublicParms ( IPublicParmsUnion parms ) : SymmCipher
parms IPublicParmsUnion
리턴 SymmCipher

Decrypt() 공개 정적인 메소드

public static Decrypt ( SymDefObject symDef, byte key, byte iv, byte dataToDecrypt ) : byte[]
symDef SymDefObject
key byte
iv byte
dataToDecrypt byte
리턴 byte[]

Decrypt() 공개 메소드

public Decrypt ( byte data, byte iv = null ) : byte[]
data byte
iv byte
리턴 byte[]

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Encrypt() 공개 정적인 메소드

public static Encrypt ( SymDefObject symDef, byte key, byte iv, byte dataToEncrypt ) : byte[]
symDef SymDefObject
key byte
iv byte
dataToEncrypt byte
리턴 byte[]

Encrypt() 공개 메소드

Performs the TPM-defined CFB encrypt using the associated algorithm. This routine assumes that the integrity value has been prepended.
public Encrypt ( byte data, byte iv = null ) : byte[]
data byte
iv byte
리턴 byte[]

GetBlockSize() 공개 정적인 메소드

public static GetBlockSize ( SymDefObject symDef ) : int
symDef SymDefObject
리턴 int

GetCipherMode() 공개 정적인 메소드

public static GetCipherMode ( TpmAlgId cipherMode ) : CipherMode
cipherMode TpmAlgId
리턴 CipherMode

SensitiveFromDuplicateBlob() 공개 정적인 메소드

De-envelope inner-wrapped duplication blob. TODO: Move this to TpmPublic and make it fully general
public static SensitiveFromDuplicateBlob ( TpmPrivate exportedPrivate, SymDefObject encAlg, byte encKey, TpmAlgId nameAlg, byte name ) : Sensitive
exportedPrivate TpmPrivate
encAlg SymDefObject
encKey byte
nameAlg TpmAlgId
name byte
리턴 Sensitive

프로퍼티 상세

LimitedSupport 공개적으로 프로퍼티

public bool LimitedSupport
리턴 bool