ed25519-android is ed25519 wrapper for android.
Gradle:
In app/build.gradle
repositories {
github("kobaken0029", "ed25519-android", "gh-pages", "repository")
}
dependencies {
compile 'click.kobaken:ed25519-android:1.0.0'
}
Generate keyPair.
public static KeyPair createKeyPair();
Signature for message with keyPair.
public static String sign(String message, KeyPair keyPair);
Verify message by signature and publicKey.
public static boolean verify(String signature, String message, String publicKey);
KeyPair is this↓
public static class KeyPair {
private String publicKey;
private String privateKey;
public KeyPair(String publicKey, String privateKey) {
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public String getPublicKey() {
return publicKey;
}
public String getPrivateKey() {
return privateKey;
}
}