Tabnine Logo
KeyAddress.getPacked
Code IndexAdd Tabnine to your IDE (free)

How to use
getPacked
method
in
com.icodici.crypto.KeyAddress

Best Java code snippets using com.icodici.crypto.KeyAddress.getPacked (Showing top 4 results out of 315)

origin: UniversaBlockchain/universa

@Override
public boolean equals(Object obj) {
  if (obj instanceof KeyAddress) {
    KeyAddress ka = (KeyAddress) obj;
    return Arrays.equals(ka.getPacked(), getPacked());
  }
  return super.equals(obj);
}
origin: UniversaBlockchain/universa

@Override
public Binder serialize(Object object, BiSerializer serializer) {
  return Binder.of("uaddress", serializer.serialize(((KeyAddress) object).getPacked())); //TODO: serialization is necessary
}
origin: UniversaBlockchain/universa

@Override
public Binder serialize(Object object, BiSerializer serializer) {
  Object s = serializer.serialize(((KeyAddress) object).getPacked());;
  Binder serialized = (Binder) s;
  if(serialized.containsKey("base64")) {
    serialized.put("base58", Safe58.encode(Base64.decodeLines((String) serialized.remove("base64"))));
  }
  return Binder.of("uaddress", serialized);
}
origin: UniversaBlockchain/universa

private void testMatch(boolean use384) throws KeyAddress.IllegalAddressException {
  KeyAddress a = key1.address(use384, 7);
  KeyAddress b = new KeyAddress(a.toString());
  assertEquals(7, b.getTypeMark());
  assertEquals(7, a.getTypeMark());
  assertTrue(b.isMatchingKey(key1));
  assertTrue(a.isMatchingKeyAddress(b));
  assertTrue(b.isMatchingKeyAddress(a));
  assertTrue(key1.isMatchingKey(key1));
  assertTrue(key1.isMatchingKeyAddress(a));
  assertTrue(key1.isMatchingKeyAddress(b));
  byte[] pack = a.getPacked();
  pack[7] ^= 71;
  try {
    new KeyAddress(pack);
    fail("must throw error on spoiled address");
  }
  catch(KeyAddress.IllegalAddressException e) {
  }
}
com.icodici.cryptoKeyAddressgetPacked

Popular methods of KeyAddress

  • <init>
    Unpack an address. After construction, use #getTypeMark() and #isMatchingKey(AbstractKey) methods to
  • toString
    Get the packed string representaion. Uses Safe58 to encode data provided by the #getPacked()
  • isMatchingKey
    Check that the key matches this address, e.g. has of the same type and the digest of its components
  • isLong
  • isMatchingKeyAddress
    Check that the address matches key information. It DOES NOT check the typeMark #getTypeMark()! If th
  • equals
  • getBiAdapter
  • getTypeMark
  • mask
    Each supported key has a mask that represents its type. The key that has no known mask can't be proc

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JFrame (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now