SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c File Reference


Functions

UINT16 EFIAPI GetHashSizeFromAlgo (IN TPMI_ALG_HASH HashAlgo)
UINT32 EFIAPI CopyAuthSessionCommand (IN TPMS_AUTH_COMMAND *AuthSessionIn, OUT UINT8 *AuthSessionOut)
UINT32 EFIAPI CopyAuthSessionResponse (IN UINT8 *AuthSessionIn, OUT TPMS_AUTH_RESPONSE *AuthSessionOut)

Variables

STATIC INTERNAL_HASH_INFO mHashInfo []

Detailed Description

Implement TPM2 help.

Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

UINT32 EFIAPI CopyAuthSessionCommand ( IN TPMS_AUTH_COMMAND *  AuthSessionIn,
OUT UINT8 *  AuthSessionOut 
)

UINT32 EFIAPI CopyAuthSessionResponse ( IN UINT8 *  AuthSessionIn,
OUT TPMS_AUTH_RESPONSE *  AuthSessionOut 
)

Copy AuthSessionIn from TPM2 response buffer.

Parameters:
[in] AuthSessionIn Input AuthSession data in TPM2 response buffer
[out] AuthSessionOut Output AuthSession data
Returns:
AuthSession size

References UINTN().

UINT16 EFIAPI GetHashSizeFromAlgo ( IN TPMI_ALG_HASH  HashAlgo  ) 

Return size of digest.

Parameters:
[in] HashAlgo Hash algorithm
Returns:
size of digest

References mHashInfo, and UINTN().

Referenced by CopyDigestListToBuffer(), DumpEvent2(), GetDigestListBinSize(), GetDigestListSize(), GetPcrEvent2Size(), Tpm2EventSequenceComplete(), Tpm2GetDigestFromDigestList(), Tpm2PcrEvent(), and Tpm2PcrExtend().


Variable Documentation

STATIC INTERNAL_HASH_INFO mHashInfo[]

Initial value:

 {
  {TPM_ALG_SHA1,          SHA1_DIGEST_SIZE},
  {TPM_ALG_SHA256,        SHA256_DIGEST_SIZE},
  {TPM_ALG_SM3_256,       SM3_256_DIGEST_SIZE},
  {TPM_ALG_SHA384,        SHA384_DIGEST_SIZE},
  {TPM_ALG_SHA512,        SHA512_DIGEST_SIZE},
}

Referenced by GetHashInfo(), and GetHashSizeFromAlgo().


Generated on Thu Sep 24 23:44:24 2015 for SecurityPkg[ALL] by  doxygen 1.5.7.1