Skip to content

Commit

Permalink
Merge pull request #50 from ZenGo-X/curv-0.7
Browse files Browse the repository at this point in the history
Use curv from crates.io and bump version
  • Loading branch information
omershlo authored May 13, 2021
2 parents 77104ec + da4a93c commit 6656e42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "class_group"
version = "0.5.1"
version = "0.5.2"
authors = ["omershlo <[email protected]>"]
edition = "2018"
links = "libpari"
Expand All @@ -16,10 +16,7 @@ serde_derive = "1.0"
serde_json = "1.0"
ring-algorithm = "0.2.3"
num-traits = "0.2"

[dependencies.curv]
git = "https://github.com/KZen-networks/curv"
tag = "v0.6.2"
curv = { package = "curv-kzen", version = "0.7" }

[dev-dependencies]
criterion = ">=0.2"
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use libc::c_char;
use std::ffi::CStr;
use std::mem::swap;
use std::ops::Neg;
use std::str;
use std::{str, ptr};

pub mod primitives;

Expand Down Expand Up @@ -172,8 +172,7 @@ impl BinaryQF {
let pari_qf = self.qf_to_pari_qf();
let pari_n = bn_to_gen(n);

let mut v = unsafe { std::mem::MaybeUninit::uninit().assume_init() };
let pari_qf_exp = unsafe { nupow(pari_qf, pari_n, &mut v) };
let pari_qf_exp = unsafe { nupow(pari_qf, pari_n, ptr::null_mut()) };
let qf_exp = BinaryQF::pari_qf_to_qf(pari_qf_exp);
qf_exp
}
Expand Down

0 comments on commit 6656e42

Please sign in to comment.