---
name: "TPMLIB_GetVersion"
section: "3"
platform: "linux"
package: "libtpms"
version: "0.10.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/TPMLIB_GetVersion"
---

# TPMLIB\_GetVersion(3)

Get the version of the TPM library

## NAME

TPMLIB\_GetVersion  - Get the version of the TPM library

## LIBRARY

TPM library (libtpms, -ltpms)

## SYNOPSIS

**#include \<libtpms/tpm\_library.h**\>

**uint32\_t TPMLIB\_GetVersion(void);**

## DESCRIPTION

The **TPMLIB\_GetVersion()** function returns the libtpms library version. The TPM library version is formatted as follows:

```
        Bits 0 - 7  : revision of the library
        Bits 8 -15  : minor version number of the library
        Bits 16-23  : major version number of the library
```

V0.5.1 is therefore represented as 0x00000501.

## SEE ALSO

[**TPMLIB\_MainInit**(3)](/TPMLIB_MainInit/3.md), [**TPMLIB\_Terminate**(3)](/TPMLIB_Terminate/3.md)
