Creating publickey to String
This commit is contained in:
parent
51bed577aa
commit
511b11ac40
2 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package com.luminiasoft.bitshares;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import org.bitcoinj.core.ECKey;
|
||||
import org.bitcoinj.crypto.HDKeyDerivation;
|
||||
import org.bitcoinj.crypto.MnemonicCode;
|
||||
|
@ -20,4 +21,8 @@ public class BIP39 {
|
|||
|
||||
}
|
||||
|
||||
public String getPublicKey() {
|
||||
return Base64.getEncoder().encodeToString(mPrivateKey.getPubKey());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import org.bitcoinj.core.ECKey;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* Created by nelson on 11/19/16.
|
||||
|
@ -27,4 +28,8 @@ public class BrainKey {
|
|||
System.out.println("UnsupportedEncodingException. Msg: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public String getPublicKey() {
|
||||
return Base64.getEncoder().encodeToString(mPrivateKey.getPubKey());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue