Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hanyunx committed Apr 30, 2022
1 parent 2e341cc commit 5e972bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion crates/threshold-bls-ffi/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,12 @@ pub unsafe extern "C" fn destroy_sig(signature: *mut Signature) {
///
/// The seed MUST be at least 32 bytes long
#[no_mangle]
pub unsafe extern "C" fn threshold_keygen(n: usize, t: usize, seed: *const Buffer, keys: *mut *mut Keys) {
pub unsafe extern "C" fn threshold_keygen(
n: usize,
t: usize,
seed: *const Buffer,
keys: *mut *mut Keys,
) {
let seed = <&[u8]>::from(unsafe { &*seed });
let mut rng = get_rng(seed);
let private = Poly::<PrivateKey>::new_from(t - 1, &mut rng);
Expand Down
2 changes: 1 addition & 1 deletion crates/threshold-bls-ffi/src/wasm.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! # BLS12-377 WASM Bindings for Blind Threshold Signatures.
use wasm_bindgen::prelude::*;

use blake2::{Blake2s256, Digest};
use rand_chacha::ChaChaRng;
use rand_core::{RngCore, SeedableRng};
use blake2::{Blake2s256, Digest};

use threshold_bls::{
poly::{Idx as Index, Poly},
Expand Down
2 changes: 1 addition & 1 deletion crates/threshold-bls/src/curve/bls12377.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::group::PrimeOrder;
use crate::group::{self, Element, PairingCurve as PC, Point, Scalar as Sc};
use ark_bls12_377 as bls377;
use ark_ff::PrimeField;
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::PrimeField;
use ark_ff::{Field, One, UniformRand, Zero};
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use bls_crypto::{
Expand Down

0 comments on commit 5e972bf

Please sign in to comment.