congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ECKey.computeAddress
Code IndexAdd Tabnine to your IDE (free)

How to use
computeAddress
method
in
io.yggdrash.common.crypto.ECKey

Best Java code snippets using io.yggdrash.common.crypto.ECKey.computeAddress (Showing top 5 results out of 315)

origin: yggdrash/yggdrash

/**
 * Gets the address form of the public key.
 *
 * @return 20-byte address
 */
public byte[] getAddress() {
  if (pubKeyHash == null) {
    pubKeyHash = computeAddress(this.pub);
  }
  return pubKeyHash;
}
origin: yggdrash/yggdrash

/**
 * Compute an address from a public point.
 *
 * @param pubPoint a public point
 * @return 20-byte address
 */
public static byte[] computeAddress(ECPoint pubPoint) {
  return computeAddress(pubPoint.getEncoded(/* uncompressed */ false));
}
origin: yggdrash/yggdrash

/**
 * Compute the address of the key that signed the given signature.
 *
 * @param messageHash     32-byte hash of message
 * @param signatureBase64 Base-64 encoded signature
 * @return 20-byte address
 */
public static byte[] signatureToAddress(byte[] messageHash, String signatureBase64) throws SignatureException {
  return computeAddress(signatureToKeyBytes(messageHash, signatureBase64));
}
origin: yggdrash/yggdrash

/**
 * Compute the address of the key that signed the given signature.
 *
 * @param messageHash 32-byte hash of message
 * @param sig         -
 * @return 20-byte address
 */
public static byte[] signatureToAddress(byte[] messageHash, ECDSASignature sig) throws SignatureException {
  return computeAddress(signatureToKeyBytes(messageHash, sig));
}
origin: yggdrash/yggdrash

/**
 * @param recId       Which possible key to recover.
 * @param sig         the R and S components of the signature, wrapped.
 * @param messageHash Hash of the data that was signed.
 * @return 20-byte address
 */
@Nullable
public static byte[] recoverAddressFromSignature(int recId, ECDSASignature sig, byte[] messageHash) {
  final byte[] pubBytes = recoverPubBytesFromSignature(recId, sig, messageHash);
  if (pubBytes == null) {
    return null;
  } else {
    return computeAddress(pubBytes);
  }
}
io.yggdrash.common.cryptoECKeycomputeAddress

Javadoc

Compute an address from a public point.

Popular methods of ECKey

  • <init>
    Generates an entirely new keypair with the given SecureRandom object. BouncyCastle will be used as
  • doSign
    Signs the given hash and returns the R and S components as BigIntegers and put them in ECDSASignatur
  • fromPrivate
    Creates an ECKey given the private key only.
  • fromPublicOnly
    Creates an ECKey that cannot be used for signing, only verifying signatures, from the given encoded
  • getAddress
    Gets the address form of the public key.
  • getNodeId
    Generates the NodeID based on this key, that is the public key without first format byte
  • getPrivKeyBytes
    Returns a 32 byte array containing the private key, or null if the key is encrypted or public only
  • getPubKey
    Gets the encoded public key value.
  • isPubKeyCanonical
    Returns true if the given pubkey is canonical, i.e. the correct length taking into wallet compressio
  • recoverPubBytesFromSignature
    Given the components of a signature and a selector value, recover and return the public key that gen
  • sign
    Takes the keccak hash (32 bytes) of data and returns the ECDSA signature
  • signatureToKey
    Compute the key that signed the given signature.
  • sign,
  • signatureToKey,
  • verify,
  • check,
  • decompressKey,
  • equals,
  • extractPublicKey,
  • fromNodeId,
  • getPubKeyPoint

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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