程序包 proguard.util

类 HashUtil


  • public class HashUtil
    extends java.lang.Object
    Hashing functions.
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static int hash​(byte[] data, int init)
      Computes a hash of the given bytes, using the FNV-1a hashing function, but with a custom inital hash value.
      static int hash​(java.lang.String string, int init)
      Convience method for computing the FNV-1a hash on the UTF-8 encoded byte representation of the given String, using the given initial hash value.
      static int hashFnv1a32​(byte[] data)
      FNV-1a hashing function.
      static int hashFnv1a32_UTF8​(java.lang.String string)
      Convience method for computing the FNV-1a hash on the UTF-8 encoded byte representation of the given String.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • FNV_HASH_INIT

        public static final int FNV_HASH_INIT
        另请参阅:
        常量字段值
      • FNV_HASH_PRIME

        public static final int FNV_HASH_PRIME
        另请参阅:
        常量字段值
    • 方法详细资料

      • hashFnv1a32_UTF8

        public static int hashFnv1a32_UTF8​(java.lang.String string)
        Convience method for computing the FNV-1a hash on the UTF-8 encoded byte representation of the given String.
      • hash

        public static int hash​(java.lang.String string,
                               int init)
        Convience method for computing the FNV-1a hash on the UTF-8 encoded byte representation of the given String, using the given initial hash value.
      • hashFnv1a32

        public static int hashFnv1a32​(byte[] data)
        FNV-1a hashing function.

        https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function

      • hash

        public static int hash​(byte[] data,
                               int init)
        Computes a hash of the given bytes, using the FNV-1a hashing function, but with a custom inital hash value.