Recover the public key from an encoded node id.

@param nodeId
a 64-byte X,Y point pair
@return ECKey
432086
public static ECKey fromNodeId(byte[] nodeId) {
        check(nodeId.length == 64, "Expected a 64 byte node id");
        byte[] pubBytes = new byte[65];
        System.arraycopy(nodeId, 0, pubBytes, 1, nodeId.length);
        pubBytes[0] = 0x04; // uncompressed
        return ECKey.fromPublicOnly(pubBytes);
    }
278392
Lockable<SharedBufferNode> getEntry(NodeId nodeId) {
		return entryCache.computeIfAbsent(nodeId, id -> {
			try {
				return entries.get(id);
			} catch (Exception ex) {
				throw new WrappingRuntimeException(ex);
			}
		});
	}
715629
def pubkey(self, identity, ecdh=False):
        """"""
        _verify_support(identity)
        data = self.vk.to_string()
        x, y = data[:32], data[32:]
        prefix = bytearray([2 + (bytearray(y)[0] & 1)])
        return bytes(prefix) + x
1324462
@Nonnull
    public static String getIRIFromNodeID(String nodeID) {
        if (nodeID.startsWith(PREFIX_SHARED_NODE)) {
            return nodeID;
        }
        return PREFIX_SHARED_NODE + nodeID.replace(NODE_ID_PREFIX, "");
    }
386578
public boolean checkKeyBelongsToNode(byte[] key, int nodeId) {
        List<Integer> nodePartitions = cluster.getNodeById(nodeId).getPartitionIds();
        List<Integer> replicatingPartitions = getReplicatingPartitionList(key);
        // remove all partitions from the list, except those that belong to the
        // node
        replicatingPartitions.retainAll(nodePartitions);
        return replicatingPartitions.size() > 0;
    }
532451
public static byte[] publicKeyFromPrivate(BigInteger privKey, boolean compressed) {
        ECPoint point = publicPointFromPrivate(privKey);
        return point.getEncoded(compressed);
    }
562659
public NodeConfig setId(String id) {
    return setId(id != null ? NodeId.from(id) : null);
  }
900568
private IOStat getIOStat(final int nodeid) {
		IOStat io = iostats.get(nodeid);
		if (io == null) {
			io = new IOStat(nodeid);
			iostats.put(nodeid, io);
		}
		return io;
	}
2693
public int getSubnetwork(int nodeId) {
        byte[] bytes = new byte[1];
        da.getBytes(nodeId, bytes, bytes.length);

        return (int) bytes[0];
    }
958959
public RemoteAddress getAddress(String nodeID) {
		NodeDescriptor node = nodes.get(nodeID);
		if (node == null) {
			return null;
		}
		RemoteAddress address;
		node.readLock.lock();
		try {
			address = new RemoteAddress(node.host, node.port);
		} finally {
			node.readLock.unlock();
		}
		return address;
	}
536386
public static PublicKey decodePublicKey(String pemEncoded) throws Exception {
        pemEncoded = removeBeginEnd(pemEncoded);
        byte[] encodedBytes = Base64.getDecoder().decode(pemEncoded);

        X509EncodedKeySpec spec = new X509EncodedKeySpec(encodedBytes);
        KeyFactory kf = KeyFactory.getInstance("RSA");
        return kf.generatePublic(spec);
    }
863229
public static NKey fromPublicKey(char[] publicKey) {
        byte[] raw = decode(publicKey);
        int prefix = raw[0] & 0xFF;

        if (!checkValidPublicPrefixByte(prefix)) {
            throw new IllegalArgumentException("Not a valid public NKey");
        }

        Type type = NKey.Type.fromPrefix(prefix);
        return new NKey(type, publicKey, null);
    }
578131
public N getNode(int nodeID) {
    if(nodeID == getPageID(rootEntry)) {
      return getRoot();
    }
    else {
      return file.readPage(nodeID);
    }
  }
629094
private PGPSecretKey getSecretKey(InputStream input, String keyId) throws IOException, PGPException {
        PGPSecretKeyRingCollection keyrings = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(input), new JcaKeyFingerprintCalculator());

        Iterator rIt = keyrings.getKeyRings();

        while (rIt.hasNext()) {
            PGPSecretKeyRing kRing = (PGPSecretKeyRing) rIt.next();
            Iterator kIt = kRing.getSecretKeys();

            while (kIt.hasNext()) {
                PGPSecretKey key = (PGPSecretKey) kIt.next();

                if (key.isSigningKey() && String.format("%08x", key.getKeyID() & 0xFFFFFFFFL).equals(keyId.toLowerCase())) {
                    return key;
                }
            }
        }

        return null;
    }
1313477
public Certificate findCertificateById(byte[] certificateId) throws CertificateNotFoundException {
        if (certificateId == null) {
            throw new CertificateNotFoundException("Certificate with id null not found from pubFile='" + this.toString() + "'");
        }
        for (InMemoryCertificateRecord record : certificateRecords) {
            if (Arrays.equals(certificateId, record.getCertificateId())) {
                return X509CertUtil.toCert(record.getCertificate());
            }
        }
        throw new CertificateNotFoundException("Certificate with id " + Base64.encode(certificateId) + " not found from pubFile='" + this.toString() + "'");
    }
917355
public static final long fromVertexId(long id) {
        Preconditions.checkArgument(id > 0, "Invalid vertex id provided: %s", id);
        return IDManager.VertexIDType.NormalVertex.removePadding(id);
    }
90137
def from_id(cls, id):
        
        decoded = cls.ensure_bytes(base58.b58decode(id))
        assert_type_and_length('id', decoded, bytes, L=33)
        pk = nacl.public.PublicKey(decoded[:-1])
        cs = decoded[-1:]
        if cs != pyblake2.blake2s(pk.encode(), 1).digest():
            raise ValueError("Public Key does not match its attached checksum byte: id='{}', decoded='{}', given checksum='{}', calculated checksum={}".format(id, decoded, cs, pyblake2.blake2s(pk.encode(), 1).digest()))
        return cls(pk)