Package score.impl

Class Crypto


  • public class Crypto
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Crypto()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] getAddressBytesFromKey​(byte[] pubKey)  
      static byte[] hash​(java.lang.String alg, byte[] msg)  
      static byte[] keccack256​(byte[] msg)  
      static byte[] recoverKey​(java.lang.String alg, byte[] msg, byte[] sig, boolean compressed)  
      static byte[] sha256​(byte[] msg)  
      static byte[] sha3_256​(byte[] msg)  
      static boolean verifySignature​(java.lang.String alg, byte[] msg, byte[] sig, byte[] pk)  
      • Methods inherited from class java.lang.Object

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

      • Crypto

        public Crypto()
    • Method Detail

      • sha3_256

        public static byte[] sha3_256​(byte[] msg)
      • sha256

        public static byte[] sha256​(byte[] msg)
      • keccack256

        public static byte[] keccack256​(byte[] msg)
      • hash

        public static byte[] hash​(java.lang.String alg,
                                  byte[] msg)
      • verifySignature

        public static boolean verifySignature​(java.lang.String alg,
                                              byte[] msg,
                                              byte[] sig,
                                              byte[] pk)
      • recoverKey

        public static byte[] recoverKey​(java.lang.String alg,
                                        byte[] msg,
                                        byte[] sig,
                                        boolean compressed)
      • getAddressBytesFromKey

        public static byte[] getAddressBytesFromKey​(byte[] pubKey)