[java] bitcoin address to Hash160

/**
     *  <dependency>
     *             <groupId>org.bitcoinj</groupId>
     *             <artifactId>bitcoinj-core</artifactId>
     *             <version>0.14.7</version>
     *   </dependency>
     * check url:https://www.blockchain.com/btc/address/1PuP5zo8E1iuRbc6J5f7pnfTZM4eJMGu6t
     */
    public static  void  addressToHash160(){

        NetworkParameters main = MainNetParams.get();
        Address address = new Address(main, "1PuP5zo8E1iuRbc6J5f7pnfTZM4eJMGu6t");
        Utils.HEX.encode(address.getHash160())
    }
相關文章
相關標籤/搜索