controller
Class KeyUtils

java.lang.Object
  extended by controller.KeyUtils

public class KeyUtils
extends java.lang.Object


Constructor Summary
KeyUtils()
           
 
Method Summary
static java.lang.String bytesToHex(byte[] bytes)
           
static com.google.bitcoin.core.ECKey createEcKey()
           
static com.google.bitcoin.core.ECKey createEcKeyFromHexString(java.lang.String privateKey)
           
static com.google.bitcoin.core.ECKey createEcKeyFromHexStringFile(java.lang.String privKeyFile)
          Convenience method.
static java.lang.String deriveSIN(com.google.bitcoin.core.ECKey ecKey)
           
static java.lang.String getKeyStringFromFile(java.lang.String filename)
           
static byte[] hexToBytes(java.lang.String hex)
           
static com.google.bitcoin.core.ECKey loadEcKey()
           
static boolean privateKeyExists()
           
static void saveEcKey(com.google.bitcoin.core.ECKey ecKey)
           
static java.lang.String sign(com.google.bitcoin.core.ECKey key, java.lang.String input)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyUtils

public KeyUtils()
Method Detail

privateKeyExists

public static boolean privateKeyExists()

createEcKey

public static com.google.bitcoin.core.ECKey createEcKey()

createEcKeyFromHexString

public static com.google.bitcoin.core.ECKey createEcKeyFromHexString(java.lang.String privateKey)

createEcKeyFromHexStringFile

public static com.google.bitcoin.core.ECKey createEcKeyFromHexStringFile(java.lang.String privKeyFile)
                                                                  throws java.io.IOException
Convenience method.

Throws:
java.io.IOException

loadEcKey

public static com.google.bitcoin.core.ECKey loadEcKey()
                                               throws java.io.IOException
Throws:
java.io.IOException

getKeyStringFromFile

public static java.lang.String getKeyStringFromFile(java.lang.String filename)
                                             throws java.io.IOException
Throws:
java.io.IOException

saveEcKey

public static void saveEcKey(com.google.bitcoin.core.ECKey ecKey)
                      throws java.io.IOException
Throws:
java.io.IOException

deriveSIN

public static java.lang.String deriveSIN(com.google.bitcoin.core.ECKey ecKey)
                                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

sign

public static java.lang.String sign(com.google.bitcoin.core.ECKey key,
                                    java.lang.String input)

hexToBytes

public static byte[] hexToBytes(java.lang.String hex)
                         throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

bytesToHex

public static java.lang.String bytesToHex(byte[] bytes)