Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary parsing #60

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions moat-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ async fn main() -> Result<(), Error> {
let requests = MoatCore::get_owned_requests(&ssk_lp, &moat_context).await?;

// Issue a license
let attr_data = JubJubScalar::from(
"1234".parse::<u64>().expect("attribute date is correct"),
);
let attr_data = JubJubScalar::from(1234u64);
let rng = &mut OsRng;
let license_hash = MoatCore::issue_license(
requests.get(0).expect("A request was owned."),
Expand All @@ -71,9 +69,7 @@ async fn main() -> Result<(), Error> {

// Use a license
let psk_sp = psk_lp; // we set the same one than the LP just for testing
let challenge = JubJubScalar::from(
"1234".parse::<u64>().expect("challenge value is correct"),
);
let challenge = JubJubScalar::from(1234u64);
let session_cookie = MoatCore::use_license(
&moat_context,
&psk_lp,
Expand Down