happy clippy
This commit is contained in:
@ -206,7 +206,7 @@ mod test {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_sign_verify() -> Result<()> {
|
fn test_sign_verify() -> Result<()> {
|
||||||
let content = Value::String("thistest".to_string());
|
let content = Value::String("thistest".to_string());
|
||||||
let id = OwnedIdentity::new();
|
let id = OwnedIdentity::create();
|
||||||
let msg1 = Message::sign(None, &id, content.clone())?.to_string();
|
let msg1 = Message::sign(None, &id, content.clone())?.to_string();
|
||||||
let msg1 = Message::from_str(&msg1)?;
|
let msg1 = Message::from_str(&msg1)?;
|
||||||
let msg2 = Message::sign(Some(&msg1), &id, content)?.to_string();
|
let msg2 = Message::sign(Some(&msg1), &id, content)?.to_string();
|
||||||
|
@ -139,7 +139,7 @@ mod test {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_msg_cipher_to_one_helper() -> Result<()> {
|
fn test_msg_cipher_to_one_helper() -> Result<()> {
|
||||||
let id = OwnedIdentity::new();
|
let id = OwnedIdentity::create();
|
||||||
let plaintext = "holar";
|
let plaintext = "holar";
|
||||||
let ciphertext = privatebox_cipher(plaintext, &[&id.id])?;
|
let ciphertext = privatebox_cipher(plaintext, &[&id.id])?;
|
||||||
assert_eq!(is_privatebox(&ciphertext), true);
|
assert_eq!(is_privatebox(&ciphertext), true);
|
||||||
|
@ -9,7 +9,7 @@ pub struct OwnedIdentity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl OwnedIdentity {
|
impl OwnedIdentity {
|
||||||
pub fn new() -> OwnedIdentity {
|
pub fn create() -> OwnedIdentity {
|
||||||
let (pk, sk) = ed25519::gen_keypair();
|
let (pk, sk) = ed25519::gen_keypair();
|
||||||
OwnedIdentity {
|
OwnedIdentity {
|
||||||
pk,
|
pk,
|
||||||
|
Reference in New Issue
Block a user