Derive address using ``RIPEMD160(SHA256(x))``
163706
def derivesha256address(self):
        
        pkbin = unhexlify(repr(self._pubkey))
        addressbin = ripemd160(hexlify(hashlib.sha256(pkbin).digest()))
        return Base58(hexlify(addressbin).decode('ascii'))
499986
def GetAddress(self):
        
        script = b'21' + self.PublicKey.encode_point(True) + b'ac'
        script_hash = Crypto.ToScriptHash(script)
        address = Crypto.ToAddress(script_hash)
        return address
1284960
private byte[] getSha256(byte[] data) throws NoSuchAlgorithmException {
        MessageDigest digest = MessageDigest.getInstance("SHA-256");
        return digest.digest(data);
    }
644848
def get_bip32_address(self, ecdh=False):
        """"""
        index = struct.pack('<L', self.identity_dict.get('index', 0))
        addr = index + self.to_bytes()
        log.debug('bip32 address string: %r', addr)
        digest = hashlib.sha256(addr).digest()
        s = io.BytesIO(bytearray(digest))

        hardened = 0x80000000
        addr_0 = 17 if bool(ecdh) else 13
        address_n = [addr_0] + list(util.recv(s, '<LLLL'))
        return [(hardened | value) for value in address_n]
180607
def derive_fernet_key(input_key):
    """"""
    hkdf = HKDF(
        algorithm=hashes.SHA256(),
        length=32,
        salt=salt,
        info=info,
        backend=backend,
    )
    return base64.urlsafe_b64encode(hkdf.derive(force_bytes(input_key)))
1052354
def hash_script(data):
        
        sha256 = hashlib.sha256()
        ripemd = hashlib.new('ripemd160')

        sha256.update(data)
        ripemd.update(sha256.digest())
        return ripemd.digest()
851824
public static byte[] generateContractAddress(byte[] address, BigInteger nonce) {
        List<RlpType> values = new ArrayList<>();

        values.add(RlpString.create(address));
        values.add(RlpString.create(nonce));
        RlpList rlpList = new RlpList(values);

        byte[] encoded = RlpEncoder.encode(rlpList);
        byte[] hashed = Hash.sha3(encoded);
        return Arrays.copyOfRange(hashed, 12, hashed.length);
    }
1291443
function pubKeyToAddr(pubKey, pubKeyHash) {
  pubKeyHash = pubKeyHash || zconfig.mainnet.pubKeyHash;

  const hash160 = zcrypto.hash160(Buffer.from(pubKey, 'hex'));
  return bs58check.encode(Buffer.from(pubKeyHash + hash160, 'hex')).toString('hex');
}
478724
def hash_sha256(buf):
    """"""
    a = hashlib.sha256(buf).hexdigest()
    return (64 - len(a)) * '0' + a
281013
function computeAddress(pubBytes) {
  if (pubBytes.length === 65) {
    pubBytes = pubBytes.slice(1);
  }

  var hash = keccak256(pubBytes).toString();
  var addressHex = hash.substring(24);
  addressHex = add_pre_fix + addressHex;
  var addressBytes = hexStr2byteArray(addressHex);
  return addressBytes;
}
523106
function getContractAddress(transaction) {
    if (!transaction.from) {
        throw new Error('missing from address');
    }
    var nonce = transaction.nonce;
    return getAddress('0x' + keccak256_1.keccak256(rlp_1.encode([
        getAddress(transaction.from),
        bytes_1.stripZeros(bytes_1.hexlify(nonce))
    ])).substring(26));
}
62260
public static LegacyAddress fromPubKeyHash(NetworkParameters params, byte[] hash160) throws AddressFormatException {
        return new LegacyAddress(params, false, hash160);
    }
530807
def address_to_pubkey(addr)
      return unless addr.size == 52

      prefix = ADDRESS_PREFIX[addr[0,2]]
      return unless prefix

      v = Bitcoin.decode_base58(addr)
      return if v[0,4] != prefix

      bytes = [v[0, 68]].pack('H*')
      return if v[68, 8] != sha256d(bytes)[0, 8]

      v[4, 64]
    end
453839
def rmd160(msg_bytes):
    '''
    
    '''
    h = hashlib.new('ripemd160')
    h.update(msg_bytes)
    return h.digest()
273129
function hashUUID(hashFn, options, buffer, offset) {
	var i, v;
	var output = buffer || new Buffer(16);
	offset = offset || 0;
	options = options || {};

	if (!options.data) {
		for (i=0; i<16; i++) {
			output[i] = 0;
		}
		return buffer || unparse(output);
	}

	if (typeof options.ns === 'string') {
		options.ns = parse(options.ns, new Buffer(16));
	}

	var hasher = crypto.createHash(hashFn);
	hasher.update(options.ns || '');
	hasher.update(options.data || '');

	switch (hashFn) {
		case 'md5': v = 0x30; break;
		case 'sha1': v = 0x50; break;
	}
	output.write(hasher.digest('binary'), offset, 16, 'binary');
	output[offset + 8] = output[offset + 8] & 0x3f | 0x80; // set variant
	output[offset + 6] = output[offset + 6] & 0x0f | v; // set version

	return buffer || unparse(output);
}
1179857
function pubKeyHashToAddress (pubKeyHash, network, type) {
  pubKeyHash = ensureBuffer(pubKeyHash)
  const prefixHash = Buffer.concat([Buffer.from(networks[network][type], 'hex'), pubKeyHash])
  const checksum = Buffer.from(sha256(sha256(prefixHash)).slice(0, 8), 'hex')
  const addr = base58.encode(Buffer.concat([prefixHash, checksum]).slice(0, 25))
  return addr
}
28531
def scripthash_to_address(scripthash):
    
    sb = bytearray([ADDRESS_VERSION]) + scripthash
    c256 = bin_dbl_sha256(sb)[0:4]
    outb = sb + bytearray(c256)
    return base58.b58encode(bytes(outb)).decode("utf-8")