+use std::convert::TryFrom;
pub const VERSION: u64 = 0;
let key = ed25519_dalek::PublicKey::from_bytes(&key)?;
let mut signature = [0; 64];
bs58::decode(self.signature.as_bytes()).into(&mut signature)?;
- let signature = ed25519_dalek::Signature::from_bytes(&signature)?;
+ let signature = ed25519_dalek::Signature::from(signature);
let msg =
bincode::serialize(&(Algorithm::Ed25519, self.expires.clone(), &key)).unwrap();
}
let mut sig = [0; 64];
bs58::decode(signature.as_bytes()).into(&mut sig)?;
- let sig = ed25519_dalek::Signature::from_bytes(&sig)?;
+ let sig = ed25519_dalek::Signature::from(sig);
key.verify_strict(&h, &sig)?;
Ok(())
}
use ed25519_dalek::Signer;
use hmac::Hmac;
use sha2::{Digest, Sha256};