Class CryptoUtils


  • public class CryptoUtils
    extends java.lang.Object
    Utilities for the crypto module (e.g. using Bouncy Castle)
    • Constructor Summary

      Constructors 
      Constructor Description
      CryptoUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] digestRipeMd160​(byte[] input)
      Calculate RIPEMD160(input).
      static byte[] onionChecksum​(byte[] pubkey, byte version)
      Calculate TOR Onion Checksum (used by PeerAddress)
      static byte[] sha256hash160​(byte[] input)
      Calculate RIPEMD160(SHA256(input)).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CryptoUtils

        public CryptoUtils()
    • Method Detail

      • sha256hash160

        public static byte[] sha256hash160​(byte[] input)
        Calculate RIPEMD160(SHA256(input)). This is used in Address calculations.
        Parameters:
        input - bytes to hash
        Returns:
        RIPEMD160(SHA256(input))
      • digestRipeMd160

        public static byte[] digestRipeMd160​(byte[] input)
        Calculate RIPEMD160(input).
        Parameters:
        input - bytes to hash
        Returns:
        RIPEMD160(input)
      • onionChecksum

        public static byte[] onionChecksum​(byte[] pubkey,
                                           byte version)
        Calculate TOR Onion Checksum (used by PeerAddress)