Package com.sun.midp.crypto

Examples of com.sun.midp.crypto.MessageDigest


     */
    public static byte[] getHash(byte[] data, int offset, int length) {

        byte[] tmp = new byte[20];
        try {
            MessageDigest md = MessageDigest.getInstance("SHA-1");
            md.update(data, offset, length);
            md.digest(tmp, 0, tmp.length);
        } catch (GeneralSecurityException e) {
            // algorithm not found - not in this implementation
            throw new RuntimeException(
                "SHA-1 algorithm for MessageDigest not supported");
        }
View Full Code Here

TOP

Related Classes of com.sun.midp.crypto.MessageDigest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.