Skip to content

Commit 89bbd6f

Browse files
authored
Update README.md
1 parent 36fb4b8 commit 89bbd6f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

example/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,26 @@ func (p MyPCRAndPolicyAuthValueSession) GetSession() (auth tpm2.Session, closer
178178
}
179179

180180
```
181+
182+
which you can call as:
183+
184+
```golang
185+
se, err := NewPCRAndPolicyAuthValueSession(rwr, []tpm2.TPMSPCRSelection{
186+
{
187+
Hash: tpm2.TPMAlgSHA256,
188+
PCRSelect: tpm2.PCClientCompatible.PCRs(uint(*pcr)),
189+
},
190+
}, []byte("testpswd"))
191+
192+
rr, err := saltpm.NewTPMCrypto(&saltpm.TPM{
193+
TpmDevice: rwc,
194+
NamedHandle: &tpm2.NamedHandle{
195+
Handle: tpm2.TPMHandle(*handle),
196+
Name: pub.Name,
197+
},
198+
AuthSession: se,
199+
})
200+
```
201+
181202
---
182203

0 commit comments

Comments
 (0)