All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.xethh.libs.toolkits.encryption.Digest Maven / Gradle / Ivy

The newest version!
package me.xethh.libs.toolkits.encryption;

import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;

public class Digest {
    public static void digestStream(InputStream is, MessageDigest digest, int byteSize){
        byte[] b = new byte[byteSize];
        try {
            while (is.read(b) != -1){
                digest.update(b);
            }
        } catch (IOException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy