wgctrl-rs 0.1.0

High level bindings to the WireGuard embeddable C library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate wgctrl_rs;

use wgctrl_rs::*;

use std::io::{self, BufRead};

fn main() {
    let stdin = io::stdin();
    for line in stdin.lock().lines() {
        println!(
            "{}",
            Key::from_base64(&line.expect("Failed to read line!"))
                .expect("Failed to parse key!")
                .generate_public()
                .to_base64()
        );
    }
}