com.softabar.sha4j
Class Sha4J
java.lang.Object
com.softabar.sha4j.Sha4J
public class Sha4J
- extends java.lang.Object
Sha4J implements SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 algorithms.
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
|
Constructor Summary |
Sha4J()
|
Sha4J(boolean closeInputStream)
|
|
Method Summary |
void |
reset()
Resets instance for use in other operation. |
byte[] |
sha1Digest(java.io.InputStream inputStream)
|
byte[] |
sha224Digest(java.io.InputStream inputStream)
|
byte[] |
sha256Digest(java.io.InputStream inputStream)
|
byte[] |
sha384Digest(java.io.InputStream inputStream)
|
byte[] |
sha512Digest(java.io.InputStream inputStream)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sha4J
public Sha4J()
Sha4J
public Sha4J(boolean closeInputStream)
sha1Digest
public byte[] sha1Digest(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
sha224Digest
public byte[] sha224Digest(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
sha256Digest
public byte[] sha256Digest(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
sha384Digest
public byte[] sha384Digest(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
sha512Digest
public byte[] sha512Digest(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
reset
public void reset()
- Resets instance for use in other operation. This must be
called before each consequent operation. If not called
results are not correct.