Example usage for org.bouncycastle.pqc.math.linearalgebra ByteUtils fromHexString

List of usage examples for org.bouncycastle.pqc.math.linearalgebra ByteUtils fromHexString

Introduction

In this page you can find the example usage for org.bouncycastle.pqc.math.linearalgebra ByteUtils fromHexString.

Prototype

public static byte[] fromHexString(String s) 

Source Link

Document

Convert a string containing hexadecimal characters to a byte-array.

Usage

From source file:com.bitsofproof.btc1k.server.vault.Vault.java

License:Apache License

public Vault(Map<String, String> keys) throws BCSAPIException, ValidationException {
    for (Map.Entry<String, String> keyEntry : keys.entrySet()) {
        publicKeys.put(keyEntry.getKey(), new ECPublicKey(ByteUtils.fromHexString(keyEntry.getValue()), true));
    }/*from w  w w . j a  va  2s  . co m*/
    log.info("Vault address: " + getVaultAddress());
    this.accountManager = new AM();
    accountManager.setCreated(new DateTime(2013, 12, 1, 0, 0).getMillis());
    accountManager.addAccountListener(new AccountListener() {
        @Override
        public void accountChanged(AccountManager account, Transaction t) {
            log.info("New account balance " + fromSatoshi(account.getBalance()) + " "
                    + fromSatoshi(account.getConfirmed()) + " confrirmed " + fromSatoshi(account.getChange())
                    + " change " + fromSatoshi(account.getReceiving()) + " receiving");
        }
    });
}