COM.claymoresystems.crypto
Class HMACInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by COM.claymoresystems.crypto.HMACInputStream
All Implemented Interfaces:
java.io.Closeable

public class HMACInputStream
extends java.io.InputStream

Provides an InputStream filter that MACs the data


Constructor Summary
HMACInputStream(java.lang.String digest, byte[] key, java.io.InputStream in)
          Create the input stream with the indicated key
HMACInputStream(java.lang.String digest, java.lang.String key, java.io.InputStream out)
          Create the input stream with the indicated key
 
Method Summary
protected  void _HMACInputStream(java.lang.String digest, byte[] key, java.io.InputStream in)
           
 byte[] digest()
           
 int read()
           
 int read(byte[] b)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HMACInputStream

public HMACInputStream(java.lang.String digest,
                       byte[] key,
                       java.io.InputStream in)
Create the input stream with the indicated key

Parameters:
digest - the digest name
key - the key
in - the input stream

HMACInputStream

public HMACInputStream(java.lang.String digest,
                       java.lang.String key,
                       java.io.InputStream out)
Create the input stream with the indicated key

Parameters:
digest - the digest name
key - the key
in - the input stream
Method Detail

_HMACInputStream

protected void _HMACInputStream(java.lang.String digest,
                                byte[] key,
                                java.io.InputStream in)

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

digest

public byte[] digest()


Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.