part6
Class WeakRedundancy

java.lang.Object
  extended bypart6.WeakRedundancy
All Implemented Interfaces:
Redundancy

public class WeakRedundancy
extends java.lang.Object
implements Redundancy

A weak redundancy class.


Constructor Summary
WeakRedundancy()
           
 
Method Summary
 boolean ok(java.math.BigInteger x)
          A method to test if the value x was produced by protect().
 java.math.BigInteger protect(java.math.BigInteger x)
          A method to add redundancy to a big integer x.
 java.math.BigInteger recover(java.math.BigInteger x)
          A method to recover a big integer value from a redundant value x produced by protect().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakRedundancy

public WeakRedundancy()
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

protect

public java.math.BigInteger protect(java.math.BigInteger x)
                             throws java.lang.Exception
Description copied from interface: Redundancy
A method to add redundancy to a big integer x.

Specified by:
protect in interface Redundancy
Throws:
java.lang.Exception

recover

public java.math.BigInteger recover(java.math.BigInteger x)
                             throws java.lang.Exception
Description copied from interface: Redundancy
A method to recover a big integer value from a redundant value x produced by protect().

Specified by:
recover in interface Redundancy
Throws:
java.lang.Exception - if the value x was not created by protect().

ok

public boolean ok(java.math.BigInteger x)
           throws java.lang.Exception
Description copied from interface: Redundancy
A method to test if the value x was produced by protect().

Specified by:
ok in interface Redundancy
Throws:
java.lang.Exception