|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object core.crypto.Digest
public class Digest
A static class providing all message digest operations
Copyright (c) 2006 Sebastian Erdweg Copyright (c) 2006 Dominik Schulz Copyright (c) 2006 Florian Lindner Copyright (c) 2006 Betim Berjani This file is part of FlexiCrypt. FlexiCrypt is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. FlexiCrypt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with FlexiCrypt; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Method Summary | |
---|---|
static boolean |
digestsEqual(byte[] b1,
byte[] b2)
Deprecated. |
static byte[] |
getDigest(byte[] input,
String algorithm)
|
static byte[] |
getDigest(File inputFile,
MessageDigest algorithm)
|
static byte[] |
getDigest(InputStream fis,
MessageDigest algorithm,
long fileLength)
Creates a MessageDigest on the FileInputStream |
static byte[] |
getDigest(InputStream fis,
String algorithm,
long inputLength)
Creates a MessageDigest on the FileInputStream |
static byte[] |
getDigest(String input,
String algorithm)
|
static int |
getDigestLength(MessageDigest algorithm)
|
static int |
getDigestLength(String algorithm)
|
static Set<String> |
getValidServices()
Creates a set of valid digest algorithms |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getDigestLength(String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static int getDigestLength(MessageDigest algorithm)
public static byte[] getDigest(InputStream fis, MessageDigest algorithm, long fileLength) throws InterruptedException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException
fis
- algorithm
- fileLength
-
InterruptedException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
IOException
public static byte[] getDigest(InputStream fis, String algorithm, long inputLength) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InterruptedException, IOException
fis
- algorithm
- inputLength
-
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InterruptedException
IOException
public static byte[] getDigest(File inputFile, MessageDigest algorithm) throws InterruptedException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException
InterruptedException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
IOException
public static byte[] getDigest(byte[] input, String algorithm) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InterruptedException, IOException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InterruptedException
IOException
public static byte[] getDigest(String input, String algorithm) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InterruptedException, IOException
NoSuchAlgorithmException
InvalidAlgorithmParameterException
InterruptedException
IOException
public static Set<String> getValidServices()
@Deprecated public static boolean digestsEqual(byte[] b1, byte[] b2)
b1
- a byte arrayb2
- antoher byte array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |