Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sekhat committed Jan 21, 2021
1 parent 3ee2795 commit f3fec5d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/crypto/sign/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ pub fn to_curve25519_pk(ed25519_pk: &PublicKey) -> Result<box_::PublicKey, ()> {
let mut x25519_pk = box_::PublicKey([0u8; box_::PUBLICKEYBYTES]);

let ret = unsafe {
ffi::crypto_sign_ed25519_pk_to_curve25519(
x25519_pk.0.as_mut_ptr(),
ed25519_pk.0.as_ptr(),
)
ffi::crypto_sign_ed25519_pk_to_curve25519(x25519_pk.0.as_mut_ptr(), ed25519_pk.0.as_ptr())
};

if ret == 0 {
Expand All @@ -271,10 +268,7 @@ pub fn to_curve25519_sk(ed25519_sk: &SecretKey) -> Result<box_::SecretKey, ()> {
let mut x25519_sk = box_::SecretKey([0u8; box_::SECRETKEYBYTES]);

let ret = unsafe {
ffi::crypto_sign_ed25519_sk_to_curve25519(
x25519_sk.0.as_mut_ptr(),
ed25519_sk.0.as_ptr(),
)
ffi::crypto_sign_ed25519_sk_to_curve25519(x25519_sk.0.as_mut_ptr(), ed25519_sk.0.as_ptr())
};

if ret == 0 {
Expand Down

0 comments on commit f3fec5d

Please sign in to comment.