Code example for HashFunction

Methods: bits

0
 
    private static final int NUM_CHARS;
    static { 
        HASH_FUNCTION = Hashing.sha1();
 
        NUM_BYTES = HASH_FUNCTION.bits() / 8;
 
        NUM_CHARS = 2 * NUM_BYTES;
 
        NULL = new ObjectId(new byte[20]);
    } 
 
    private final byte[] hashCode;
 
    /** 
     * Constructs a new {@code NULL} object id. 
     */ 
    public ObjectId() { 
        this.hashCode = NULL.hashCode;
    }