Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
salrashid123 authored Jun 17, 2024
1 parent 36fb4b8 commit 89bbd6f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,26 @@ func (p MyPCRAndPolicyAuthValueSession) GetSession() (auth tpm2.Session, closer
}

```

which you can call as:

```golang
se, err := NewPCRAndPolicyAuthValueSession(rwr, []tpm2.TPMSPCRSelection{
{
Hash: tpm2.TPMAlgSHA256,
PCRSelect: tpm2.PCClientCompatible.PCRs(uint(*pcr)),
},
}, []byte("testpswd"))

rr, err := saltpm.NewTPMCrypto(&saltpm.TPM{
TpmDevice: rwc,
NamedHandle: &tpm2.NamedHandle{
Handle: tpm2.TPMHandle(*handle),
Name: pub.Name,
},
AuthSession: se,
})
```

---

0 comments on commit 89bbd6f

Please sign in to comment.