cryptix.pgp
Class HashFactory

java.lang.Object
  |
  +--cryptix.pgp.HashFactory

public final class HashFactory
extends java.lang.Object

Static methods to read and write message hashes.


Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.2 $

Since:
Cryptix 2.2 or earlier
Author:
original author unknown

Method Summary
static BigInteger bigIntFromHash(PublicKey key, byte[] hash)
           
static BigInteger bigIntFromHash(PublicKey key, byte[] hash, RandomStream rand)
           
static MessageHash fromString(java.lang.String str)
           
static byte[] hashFromBigInt(BigInteger b)
           
static MessageHash load(byte[] buf)
           
static MessageHash read(java.io.DataInput in)
           
static byte[] save(MessageHash mh)
           
static java.lang.String toFilename(MessageHash mh)
           
static java.lang.String toString(MessageHash mh)
           
static void write(java.io.DataOutput out, MessageHash mh)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static MessageHash load(byte[] buf)
                        throws java.io.IOException

save

public static byte[] save(MessageHash mh)
                   throws java.io.IOException

read

public static MessageHash read(java.io.DataInput in)
                        throws java.io.IOException

write

public static void write(java.io.DataOutput out,
                         MessageHash mh)
                  throws java.io.IOException

toString

public static java.lang.String toString(MessageHash mh)

fromString

public static MessageHash fromString(java.lang.String str)

toFilename

public static java.lang.String toFilename(MessageHash mh)

bigIntFromHash

public static BigInteger bigIntFromHash(PublicKey key,
                                        byte[] hash,
                                        RandomStream rand)

bigIntFromHash

public static BigInteger bigIntFromHash(PublicKey key,
                                        byte[] hash)

hashFromBigInt

public static byte[] hashFromBigInt(BigInteger b)