Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
sdk/python/README.md: Update the example usage of quote SDK (#239)
Browse files Browse the repository at this point in the history
Signed-off-by: Yanbo0101 <yanbo.xu@intel.com>
  • Loading branch information
Yanbo0101 authored Jan 8, 2024
1 parent ff035cd commit 11bf8b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/python3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ print(quote.quote)

* Fetch quote with a `nonce`
```python
import base64
import secrets
from ccnp import Quote

nonce = secrets.token_urlsafe()
nonce = base64.b64encode(secrets.token_urlsafe().encode())
quote = Quote.get_quote(nonce=nonce)

print(quote.quote_type)
Expand All @@ -84,7 +85,7 @@ import base64
import secrets
from ccnp import Quote

nonce = secrets.token_urlsafe()
nonce = base64.b64encode(secrets.token_urlsafe().encode())
user_data = base64.b64encode(b'This data should be measured.')
quote = Quote.get_quote(nonce=nonce, user_data=user_data)

Expand Down

0 comments on commit 11bf8b6

Please sign in to comment.