File size: 322 Bytes
f0f4f2b
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use libp2p_identity::Keypair;

#[test]
fn calling_keypair_api() {
    let _ = Keypair::from_protobuf_encoding(&[]);
}

#[allow(dead_code)]
fn using_keypair(kp: Keypair) {
    let _ = kp.to_protobuf_encoding();
    let _ = kp.sign(&[]);
    let _ = kp.public();
    let _: Option<[u8; 32]> = kp.derive_secret(b"foobar");
}