org.neuclear.commons.crypto.streams
Class VerifyingOutputStream
java.lang.Object
java.io.OutputStream
org.neuclear.commons.crypto.streams.AbstractSignatureStream
org.neuclear.commons.crypto.streams.VerifyingOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class VerifyingOutputStream
- extends AbstractSignatureStream
Handy Stream for calculating the Digest of data.
|
Method Summary |
boolean |
verify()
Verify that the Stream was signed by provided signature and PublicKey. |
| Methods inherited from class java.io.OutputStream |
close, flush, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VerifyingOutputStream
public VerifyingOutputStream(java.security.KeyPair kp,
byte[] signature)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
- Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
VerifyingOutputStream
public VerifyingOutputStream(java.security.PublicKey key,
byte[] signature)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
- Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
VerifyingOutputStream
public VerifyingOutputStream(java.security.Signature sig,
byte[] signature)
verify
public final boolean verify()
throws java.security.SignatureException
- Verify that the Stream was signed by provided signature and PublicKey.
- Returns:
-
- Throws:
java.security.SignatureException
Copyright © 2003-2004 Antilles Software Ventures SA. All Rights Reserved.