com.softabar.sha4j
Class ShaUtil
java.lang.Object
com.softabar.sha4j.ShaUtil
public class ShaUtil
- extends java.lang.Object
Utility methods for Sha4J.
Copyright (C) 2006 Softabar
This program 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.
This program 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 this program; if not, write to the
Free Software Foundation, * Inc., * 59 Temple Place, * Suite 330,
Boston, MA 02111-1307 USA
|
Method Summary |
static byte[] |
sha1(java.io.File input)
|
static byte[] |
sha1(java.io.InputStream input)
|
static byte[] |
sha1(java.lang.String input)
|
static byte[] |
sha224(java.io.File input)
|
static byte[] |
sha224(java.io.InputStream input)
|
static byte[] |
sha224(java.lang.String input)
|
static byte[] |
sha256(java.io.File input)
|
static byte[] |
sha256(java.io.InputStream input)
|
static byte[] |
sha256(java.lang.String input)
|
static byte[] |
sha384(java.io.File input)
|
static byte[] |
sha384(java.io.InputStream input)
|
static byte[] |
sha384(java.lang.String input)
|
static byte[] |
sha512(java.io.File input)
|
static byte[] |
sha512(java.io.InputStream input)
|
static byte[] |
sha512(java.lang.String input)
|
static java.lang.String |
toHexString(byte[] b)
Convenience method to print byte array as hexadecimal string. |
static java.lang.String |
toSha1String(java.io.File input)
|
static java.lang.String |
toSha1String(java.io.InputStream input)
|
static java.lang.String |
toSha1String(java.lang.String input)
|
static java.lang.String |
toSha224String(java.io.File input)
|
static java.lang.String |
toSha224String(java.io.InputStream input)
|
static java.lang.String |
toSha224String(java.lang.String input)
|
static java.lang.String |
toSha256String(java.io.File input)
|
static java.lang.String |
toSha256String(java.io.InputStream input)
|
static java.lang.String |
toSha256String(java.lang.String input)
|
static java.lang.String |
toSha384String(java.io.File input)
|
static java.lang.String |
toSha384String(java.io.InputStream input)
|
static java.lang.String |
toSha384String(java.lang.String input)
|
static java.lang.String |
toSha512String(java.io.File input)
|
static java.lang.String |
toSha512String(java.io.InputStream input)
|
static java.lang.String |
toSha512String(java.lang.String input)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShaUtil
public ShaUtil()
sha1
public static byte[] sha1(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
sha1
public static byte[] sha1(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
sha1
public static byte[] sha1(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha1String
public static java.lang.String toSha1String(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha1String
public static java.lang.String toSha1String(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha1String
public static java.lang.String toSha1String(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
sha224
public static byte[] sha224(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
sha224
public static byte[] sha224(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
sha224
public static byte[] sha224(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha224String
public static java.lang.String toSha224String(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha224String
public static java.lang.String toSha224String(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha224String
public static java.lang.String toSha224String(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
sha256
public static byte[] sha256(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
sha256
public static byte[] sha256(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
sha256
public static byte[] sha256(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha256String
public static java.lang.String toSha256String(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha256String
public static java.lang.String toSha256String(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha256String
public static java.lang.String toSha256String(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
sha384
public static byte[] sha384(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
sha384
public static byte[] sha384(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
sha384
public static byte[] sha384(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha384String
public static java.lang.String toSha384String(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha384String
public static java.lang.String toSha384String(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha384String
public static java.lang.String toSha384String(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
sha512
public static byte[] sha512(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
sha512
public static byte[] sha512(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
sha512
public static byte[] sha512(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha512String
public static java.lang.String toSha512String(java.lang.String input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha512String
public static java.lang.String toSha512String(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
toSha512String
public static java.lang.String toSha512String(java.io.File input)
throws java.io.IOException
- Throws:
java.io.IOException
toHexString
public static java.lang.String toHexString(byte[] b)
- Convenience method to print byte array as hexadecimal string.
- Parameters:
b - Byte array to print.
- Returns:
- Hexadecimal string presentation of byte array.