---
name: "Tspi_PcrComposite_SetPcrValue"
section: "3"
platform: "linux"
package: "libtspi-dev"
version: "0.3.15-0.4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Tspi_PcrComposite_SetPcrValue"
---

# Tspi\_PcrComposite\_SetPcrValue(3)

## NAME

Tspi\_PcrComposite\_SetPcrValue- set the digest for a given PCR index inside a PCR composite object.

## SYNOPSIS

**#include \<tss/platform.h\>** **#include \<tss/tcpa\_defines.h\>** **#include \<tss/tcpa\_typedef.h\>** **#include \<tss/tcpa\_struct.h\>** **#include \<tss/tss\_typedef.h\>** **#include \<tss/tss\_structs.h\>** **#include \<tss/tspi.h\>** **TSS\_RESULT Tspi\_PcrComposite\_SetPcrValue(TSS\_HPCRS** *hPcrComposite***,    UINT32** *ulPcrIndex***,**                                          **UINT32**    *ulPcrValueLength***, BYTE\***  *rgbPcrValue***);**

## DESCRIPTION

**Tspi\_PcrComposite\_SetPcrValue** sets the digest for a given PCR index inside the PCR composite object.

## PARAMETERS

### hPcrComposite

Handle of the PCR composite object instance where a PCR value should be set.

### ulPcrIndex

This parameter indicates the index of the PCR to set.

### ulPcrValueLength

The length (in bytes) of the rgbPcrValue parameter.

### rgbPcrValue

Pointer to memory containing the actual value which should be set for the PCR indicated by ulPcrIndex.

## RETURN CODES

**Tspi\_PcrComposite\_SetPcrValue** returns TSS\_SUCCESS on success, otherwise one of the following values are returned: TSS\_E\_INVALID\_HANDLE - Either *hPcrComposite* or *ulPcrIndex* is an invalid parameter. TSS\_E\_INTERNAL\_ERROR - An error occurred internal to the TSS.

## CONFORMING TO

**Tspi\_PcrComposite\_SetPcrValue** conforms to the Trusted Computing Group Software Specification version 1.1 Golden

## SEE ALSO

[**Tspi\_PcrComposite\_SelectPcrIndex**(3)](/Tspi_PcrComposite_SelectPcrIndex/3.md), [**Tspi\_PcrComposite\_GetPcrValue**(3)](/Tspi_PcrComposite_GetPcrValue/3.md).
