Code example for MessageDigest

Methods: getDigestLength

0
    private static final int STREAM_ID_CS_01_LENGTH;
 
    static { 
        try { 
            DIGESTER = MessageDigest.getInstance(DIGEST_MD5);
            FINGERPRINT_BYTE_LENGTH = DIGESTER.getDigestLength();
            STREAM_ID_CS_01_LENGTH = STREAM_ID_CS_PREFIX.length()
                    + (FINGERPRINT_BYTE_LENGTH * 2);
        } catch (NoSuchAlgorithmException e) {
            // can't continue, but really shouldn't happen 
            throw new IllegalStateException(e);
        } 
    } 
 
    // md5 digest bytes. 
    private final byte[] mMd5Digest;
 
    /** 
     * Creates a new Fingerprint. 
     */ 
    public Fingerprint(byte[] bytes) {