test_class.declarator: TERMINAL_NAME = "Yubikey NEO"
test_class.modifier: private static final
test_class.original_string: private static final String TERMINAL_NAME = "Yubikey NEO";
test_class.type: String
test_class.var_name: TERMINAL_NAME
test_class.declarator: userPin = "000000"
test_class.modifier: private static final
test_class.original_string: private static final String userPin = "000000";
test_class.type: String
test_class.var_name: userPin
test_class.declarator: adminPin = "00000000"
test_class.modifier: private static final
test_class.original_string: private static final String adminPin = "00000000";
test_class.type: String
test_class.var_name: adminPin
test_class.declarator: HEX = BaseEncoding.base16().lowerCase()
test_class.modifier: private static final
test_class.original_string: private static final BaseEncoding HEX = BaseEncoding.base16().lowerCase();
test_class.type: BaseEncoding
test_class.var_name: HEX
test_class.declarator: neo
test_class.modifier: private
test_class.original_string: private YkneoBitcoin neo;
test_class.type: YkneoBitcoin
test_class.var_name: neo
test_class.file: yubico-bitcoin-java-soft/src/test/java/com/yubico/bitcoin/soft/YkneoBitcoinSoftTest.java
test_class.identifier: YkneoBitcoinSoftTest
test_case.body: @Test
      public void testSign() throws Exception {
          testImportExtended();
          neo.unlockUser(userPin);
          byte[] hash = new byte[32];
          byte[] signature = neo.sign(hash, 0);
          //TODO: Verify signature.
          assertThat(signature.length, Matchers.lessThanOrEqualTo(72));
      }
test_case.class_method_signature: YkneoBitcoinSoftTest.testSign()
test_case.full_signature: @Test public void testSign()
test_case.identifier: testSign
test_case.invocations: testImportExtended unlockUser sign assertThat lessThanOrEqualTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSign()
focal_class.declarator: VERSION = "0.1.0"
focal_class.modifier: private static final
focal_class.original_string: private static final String VERSION = "0.1.0";
focal_class.type: String
focal_class.var_name: VERSION
focal_class.declarator: DEFAULT_PIN_TRIES = 6
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_PIN_TRIES = 6;
focal_class.type: int
focal_class.var_name: DEFAULT_PIN_TRIES
focal_class.declarator: random = new SecureRandom()
focal_class.modifier: private final
focal_class.original_string: private final SecureRandom random = new SecureRandom();
focal_class.type: SecureRandom
focal_class.var_name: random
focal_class.declarator: master
focal_class.modifier: private
focal_class.original_string: private DeterministicHierarchy master;
focal_class.type: DeterministicHierarchy
focal_class.var_name: master
focal_class.declarator: userPin = "000000"
focal_class.modifier: private
focal_class.original_string: private String userPin = "000000";
focal_class.type: String
focal_class.var_name: userPin
focal_class.declarator: adminPin = "00000000"
focal_class.modifier: private
focal_class.original_string: private String adminPin = "00000000";
focal_class.type: String
focal_class.var_name: adminPin
focal_class.declarator: allowExport = false
focal_class.modifier: private
focal_class.original_string: private boolean allowExport = false;
focal_class.type: boolean
focal_class.var_name: allowExport
focal_class.declarator: userMaxRetries = DEFAULT_PIN_TRIES
focal_class.modifier: private
focal_class.original_string: private int userMaxRetries = DEFAULT_PIN_TRIES;
focal_class.type: int
focal_class.var_name: userMaxRetries
focal_class.declarator: adminMaxRetries = DEFAULT_PIN_TRIES
focal_class.modifier: private
focal_class.original_string: private int adminMaxRetries = DEFAULT_PIN_TRIES;
focal_class.type: int
focal_class.var_name: adminMaxRetries
focal_class.declarator: userTries = userMaxRetries
focal_class.modifier: private
focal_class.original_string: private int userTries = userMaxRetries;
focal_class.type: int
focal_class.var_name: userTries
focal_class.declarator: adminTries = adminMaxRetries
focal_class.modifier: private
focal_class.original_string: private int adminTries = adminMaxRetries;
focal_class.type: int
focal_class.var_name: adminTries
focal_class.declarator: userLocked = true
focal_class.modifier: private
focal_class.original_string: private boolean userLocked = true;
focal_class.type: boolean
focal_class.var_name: userLocked
focal_class.declarator: adminLocked = true
focal_class.modifier: private
focal_class.original_string: private boolean adminLocked = true;
focal_class.type: boolean
focal_class.var_name: adminLocked
focal_class.file: yubico-bitcoin-java-soft/src/main/java/com/yubico/bitcoin/soft/YkneoBitcoinSoft.java
focal_class.identifier: YkneoBitcoinSoft
focal_class.interfaces: implements YkneoBitcoin
focal_class.class_method_signature: YkneoBitcoinSoft.YkneoBitcoinSoft()
focal_class.full_signature: public  YkneoBitcoinSoft()
focal_class.identifier: YkneoBitcoinSoft
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  YkneoBitcoinSoft()
focal_class.class_method_signature: YkneoBitcoinSoft.exportExtendedPublicKey()
focal_class.full_signature: @Override public byte[] exportExtendedPublicKey()
focal_class.identifier: exportExtendedPublicKey
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] exportExtendedPublicKey()
focal_class.class_method_signature: YkneoBitcoinSoft.getAppletVersion()
focal_class.full_signature: @Override public String getAppletVersion()
focal_class.identifier: getAppletVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getAppletVersion()
focal_class.class_method_signature: YkneoBitcoinSoft.isKeyLoaded()
focal_class.full_signature: @Override public boolean isKeyLoaded()
focal_class.identifier: isKeyLoaded
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isKeyLoaded()
focal_class.class_method_signature: YkneoBitcoinSoft.unlockUser(String pin)
focal_class.full_signature: @Override public void unlockUser(String pin)
focal_class.identifier: unlockUser
focal_class.modifiers: @Override public
focal_class.parameters: (String pin)
focal_class.return: void
focal_class.signature: void unlockUser(String pin)
focal_class.class_method_signature: YkneoBitcoinSoft.unlockAdmin(String pin)
focal_class.full_signature: @Override public void unlockAdmin(String pin)
focal_class.identifier: unlockAdmin
focal_class.modifiers: @Override public
focal_class.parameters: (String pin)
focal_class.return: void
focal_class.signature: void unlockAdmin(String pin)
focal_class.class_method_signature: YkneoBitcoinSoft.isUserUnlocked()
focal_class.full_signature: @Override public boolean isUserUnlocked()
focal_class.identifier: isUserUnlocked
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isUserUnlocked()
focal_class.class_method_signature: YkneoBitcoinSoft.isAdminUnlocked()
focal_class.full_signature: @Override public boolean isAdminUnlocked()
focal_class.identifier: isAdminUnlocked
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAdminUnlocked()
focal_class.class_method_signature: YkneoBitcoinSoft.setUserPin(String oldPin, String newPin)
focal_class.full_signature: @Override public void setUserPin(String oldPin, String newPin)
focal_class.identifier: setUserPin
focal_class.modifiers: @Override public
focal_class.parameters: (String oldPin, String newPin)
focal_class.return: void
focal_class.signature: void setUserPin(String oldPin, String newPin)
focal_class.class_method_signature: YkneoBitcoinSoft.setAdminPin(String oldPin, String newPin)
focal_class.full_signature: @Override public void setAdminPin(String oldPin, String newPin)
focal_class.identifier: setAdminPin
focal_class.modifiers: @Override public
focal_class.parameters: (String oldPin, String newPin)
focal_class.return: void
focal_class.signature: void setAdminPin(String oldPin, String newPin)
focal_class.class_method_signature: YkneoBitcoinSoft.ensurePin(PinMode mode)
focal_class.full_signature: private void ensurePin(PinMode mode)
focal_class.identifier: ensurePin
focal_class.modifiers: private
focal_class.parameters: (PinMode mode)
focal_class.return: void
focal_class.signature: void ensurePin(PinMode mode)
focal_class.class_method_signature: YkneoBitcoinSoft.resetUserPin(String newPin)
focal_class.full_signature: @Override public void resetUserPin(String newPin)
focal_class.identifier: resetUserPin
focal_class.modifiers: @Override public
focal_class.parameters: (String newPin)
focal_class.return: void
focal_class.signature: void resetUserPin(String newPin)
focal_class.class_method_signature: YkneoBitcoinSoft.ensureKey()
focal_class.full_signature: private void ensureKey()
focal_class.identifier: ensureKey
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void ensureKey()
focal_class.class_method_signature: YkneoBitcoinSoft.getHeader()
focal_class.full_signature: @Override public byte[] getHeader()
focal_class.identifier: getHeader
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getHeader()
focal_class.class_method_signature: YkneoBitcoinSoft.getKey(int... index)
focal_class.full_signature: private DeterministicKey getKey(int... index)
focal_class.identifier: getKey
focal_class.modifiers: private
focal_class.parameters: (int... index)
focal_class.return: DeterministicKey
focal_class.signature: DeterministicKey getKey(int... index)
focal_class.class_method_signature: YkneoBitcoinSoft.setAdminRetryCount(int attempts)
focal_class.full_signature: @Override public void setAdminRetryCount(int attempts)
focal_class.identifier: setAdminRetryCount
focal_class.modifiers: @Override public
focal_class.parameters: (int attempts)
focal_class.return: void
focal_class.signature: void setAdminRetryCount(int attempts)
focal_class.class_method_signature: YkneoBitcoinSoft.setUserRetryCount(int attempts)
focal_class.full_signature: @Override public void setUserRetryCount(int attempts)
focal_class.identifier: setUserRetryCount
focal_class.modifiers: @Override public
focal_class.parameters: (int attempts)
focal_class.return: void
focal_class.signature: void setUserRetryCount(int attempts)
focal_class.class_method_signature: YkneoBitcoinSoft.getPublicKey(boolean compress, int... index)
focal_class.full_signature: @Override public byte[] getPublicKey(boolean compress, int... index)
focal_class.identifier: getPublicKey
focal_class.modifiers: @Override public
focal_class.parameters: (boolean compress, int... index)
focal_class.return: byte[]
focal_class.signature: byte[] getPublicKey(boolean compress, int... index)
focal_class.class_method_signature: YkneoBitcoinSoft.sign(byte[] hash, int... index)
focal_class.full_signature: @Override public byte[] sign(byte[] hash, int... index)
focal_class.identifier: sign
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] hash, int... index)
focal_class.return: byte[]
focal_class.signature: byte[] sign(byte[] hash, int... index)
focal_class.class_method_signature: YkneoBitcoinSoft.generateMasterKeyPair(boolean allowExport, boolean returnPrivateKey, boolean testnetKey)
focal_class.full_signature: @Override public byte[] generateMasterKeyPair(boolean allowExport, boolean returnPrivateKey, boolean testnetKey)
focal_class.identifier: generateMasterKeyPair
focal_class.modifiers: @Override public
focal_class.parameters: (boolean allowExport, boolean returnPrivateKey, boolean testnetKey)
focal_class.return: byte[]
focal_class.signature: byte[] generateMasterKeyPair(boolean allowExport, boolean returnPrivateKey, boolean testnetKey)
focal_class.class_method_signature: YkneoBitcoinSoft.importExtendedKeyPair(byte[] extendedPrivateKey, boolean allowExport)
focal_class.full_signature: @Override public void importExtendedKeyPair(byte[] extendedPrivateKey, boolean allowExport)
focal_class.identifier: importExtendedKeyPair
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] extendedPrivateKey, boolean allowExport)
focal_class.return: void
focal_class.signature: void importExtendedKeyPair(byte[] extendedPrivateKey, boolean allowExport)
focal_method.body: @Override
      public byte[] sign(byte[] hash, int... index) throws PinModeLockedException, UnusableIndexException, IOException, NoKeyLoadedException {
          DeterministicKey key = getKey(index);
          ECKey.ECDSASignature signature = key.toECKey().sign(new Sha256Hash(hash));
          return signature.encodeToDER();
      }
focal_method.class_method_signature: YkneoBitcoinSoft.sign(byte[] hash, int... index)
focal_method.full_signature: @Override public byte[] sign(byte[] hash, int... index)
focal_method.identifier: sign
focal_method.invocations: getKey sign toECKey encodeToDER
focal_method.modifiers: @Override public
focal_method.parameters: (byte[] hash, int... index)
focal_method.return: byte[]
focal_method.signature: byte[] sign(byte[] hash, int... index)