net.moznion:wireguard-keytool

An utility library for WireGuard keys


Licenses
Apache-2.0/libpng-2.0

Documentation

wireguard-keytool-java

CI Check codecov Maven Central javadoc

An utility library for WireGuard keys that written in Java.

Synopsis

import net.moznion.wireguard.keytool.InvalidPrivateKeyException;
import net.moznion.wireguard.keytool.WireGuardKey;

class App {
    public static void doSomething() throws InvalidPrivateKeyException {
        final WireGuardKey generatedKey = WireGuardKey.generate();
        System.out.println(generatedKey.getBase64PrivateKey()); // => output: base64 encoded private key
        System.out.println(generatedKey.getBase64PublicKey()); // => output: base64 encoded public key
    }
}

Documents

Please refer to the javadoc.

Author

moznion (moznion@mail.moznion.net)