From 2b6238da5d0b480899ccc603f91a92d4ade1236c Mon Sep 17 00:00:00 2001 From: salrashid123 Date: Mon, 17 Jun 2024 07:21:33 -0400 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 34bd83c..2879ab8 100644 --- a/README.md +++ b/README.md @@ -370,21 +370,21 @@ func (p MyPCRAndPolicyAuthValueSession) GetSession() (auth tpm2.Session, closer which you can call as: ```golang - se, err := NewPCRAndPolicyAuthValueSession(rwr, []tpm2.TPMSPCRSelection{ + p, 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, + config := &tpmjwt.TPMConfig{ + TPMDevice: rwc, + NamedHandle: tpm2.NamedHandle{ + Handle: tpm2.TPMHandle(*persistentHandle), + Name: rpub.Name, }, - AuthSession: se, - }) + AuthSession: p, + } ``` ### Usign Simulator