|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Junit test to test the FakeCryptoScheme. More...

Public Member Functions | |
| FakeCryptoSchemeTest (String toTest) | |
| Constructor. | |
| void | decryptInfinity () |
| Test the decryption of infinity. | |
| void | unique () |
| Test the unicity of all FakeCryptoScheme keys. | |
| void | decrypt () |
| Test the decrypt method. | |
| void | partialyDecrypt () |
| Test method partialyDecrypt. | |
Static Public Member Functions | |
| static TestSuite | suite () |
Protected Member Functions | |
| void | setUp () |
| void | tearDown () throws Exception |
| Ends all queues. | |
Private Member Functions | |
| void | decrypt (AddableInteger val) |
| Used to test the decryption. | |
| void | init () |
| Initialize. | |
Private Attributes | |
| Random | rand |
| Random seed. | |
| ArrayList< FakeCryptoScheme > | fcs |
| All cryptoSchemes. | |
| ArrayList< FakeEncryptedInteger > | keys |
| All keys. | |
| final AddableInteger | ZERO = new AddableInteger(0) |
| AddableInteger CONSTANT zero. | |
| final AddableInteger | V42 = new AddableInteger(42) |
| AddableInteger CONSTANT 42. | |
| final FakeEncryptedInteger | TEN = new FakeEncryptedInteger("10") |
| AddableBigInteger CONSTANT 10. | |
| int | agent = 10 |
| Number of cryptoSchemes. | |
Junit test to test the FakeCryptoScheme.
| frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.FakeCryptoSchemeTest | ( | String | toTest | ) |
| void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decrypt | ( | ) |
Test the decrypt method.
References decrypt(), and V42.
Referenced by decrypt(), and decryptInfinity().

|
private |
Used to test the decryption.
| val | the value to encrypt |
References agent, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.decrypt(), frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.encrypt(), frodo2.solutionSpaces.AddableInteger.equals(), fcs, init(), rand, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.reencrypt(), and frodo2.solutionSpaces.AddableInteger.toString().

| void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decryptInfinity | ( | ) |
Test the decryption of infinity.
References decrypt(), and frodo2.solutionSpaces.AddableInteger.PlusInfinity.PLUS_INF.

|
private |
Initialize.
References agent, fcs, keys, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.resetCounter(), and ZERO.
Referenced by decrypt(), partialyDecrypt(), and unique().

| void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.partialyDecrypt | ( | ) |
Test method partialyDecrypt.
References agent, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.equals(), fcs, init(), keys, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.mod(), frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.FakeEncryptedInteger.multiply(), rand, TEN, and V42.

|
protected |
|
static |
References FakeCryptoSchemeTest().
Referenced by frodo2.algorithms.dpop.privacy.test.AllTestsP_DPOP.suite().

|
protected |
| void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.unique | ( | ) |
|
private |
Number of cryptoSchemes.
Referenced by decrypt(), init(), and partialyDecrypt().
|
private |
All cryptoSchemes.
Referenced by decrypt(), init(), partialyDecrypt(), setUp(), and tearDown().
|
private |
All keys.
Referenced by init(), partialyDecrypt(), setUp(), tearDown(), and unique().
|
private |
Random seed.
Referenced by decrypt(), partialyDecrypt(), setUp(), and tearDown().
|
private |
AddableBigInteger CONSTANT 10.
Referenced by partialyDecrypt().
|
private |
AddableInteger CONSTANT 42.
Referenced by decrypt(), and partialyDecrypt().
|
private |
AddableInteger CONSTANT zero.
Referenced by init().