Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## spki
Class test

    java.lang.Object
      |
      +--spki.test

public class test
extends Object

This program performs tests on the class library. run 'java spki.test -h' to see run-time options available.

Version:
  $Id: test.java,v 1.53 2002/07/30 19:51:58 tep Exp $
Author:
  Tep Narula <tep@win.trlabs.ca>, adapted from SPKI.test by Per Harald Myrvang <perm@pasta.cs.uit.no>
See Also:
  `testURIs()`, `testHash()`, `testKey()`, `testName()`, `testDate()`, `testIssuer()`, `testSubjectCapability()`, `testSubjectRole()`, `testSubjectName()`, `testSubjectTransfer()`, `testSubjectAttribute()`, `testEmpowerment()`, `testEscrow()`, `testValidOffline()`, `testValidOnline()`, `testValidity()`, `testValidTransfer()`, `testTag()`, `testRoleCert()`, `testCapabilityCert()`, `testTransferCert()`, `testNameCert()`, `testAttributeCert()`, `testSequence()`, `testTuple()`, `testCapability5Tuple()`, `testRole5Tuple()`, `testCBACChainReducer()`, `testRBACChainReducer()`

Field Summary
`(package private) static String` | `__ME`
`(package private) static AttributeCert` | `attr_cert`
`(package private) static int` | `BITS`
`(package private) static CapabilityCert` | `cap_cert`
`(package private) static Certificate` | `cert`
`(package private) static Sexp` | `comment`
`(package private) static Date` | `date`
`(package private) static Date` | `date2`
`(package private) static Date` | `date3`
`(package private) static Date` | `date4`
`(package private) static Sexp` | `display_hint`
`(package private) static Empowerment` | `empowerment`
`(package private) static Escrow` | `escrow`
`(package private) static FQName` | `fqname`
`(package private) static Hash` | `hash`
`(package private) static String` | `HASH_ALG`
`(package private) static Issuer` | `issuer`
`(package private) static LocObj[]` | `issuer_loc`
`(package private) static Key[][]` | `keypairs`
`(package private) static LocalName` | `lname`
`(package private) static String` | `messageString`
`(package private) static NameCert` | `name_cert`
`(package private) static int` | `PAIRS`
`(package private) static int` | `passed`
`(package private) static boolean` | `PAUSE`
`(package private) static Principal` | `principal`
`(package private) static PrivateKey` | `priv`
`(package private) static HashDB` | `priv_keydb`
`(package private) static String` | `PRIVDB_PATH`
`(package private) static PublicKey` | `pub`
`(package private) static String` | `PUB_ALG`
`(package private) static HashDB` | `pub_keydb`
`(package private) static String` | `PUBDB_PATH`
`(package private) static RelativeName` | `rname`
`(package private) static RoleCert` | `role_cert`
`(package private) static SeqEntry[]` | `seq_entries`
`(package private) static SequenceDef` | `seqdef`
`(package private) static SequenceRef` | `seqref`
`(package private) static Sequence` | `sequence`
`(package private) static Signature` | `signature`
`(package private) static Signature` | `signature2`
`(package private) static SubjectAttribute` | `subj_attr`
`(package private) static SubjectCapability` | `subj_cap`
`(package private) static LocObj[]` | `subj_loc`
`(package private) static SubjectName` | `subj_name`
`(package private) static SubjectRole` | `subj_role`
`(package private) static SubjectTransfer` | `subj_transf`
`(package private) static Tag` | `tag`
`(package private) static int` | `TEST_ROUNDS`
`(package private) static int` | `tested`
`(package private) static TransferCert` | `transfer_cert`
`(package private) static URIs` | `uri`
`(package private) static Validity` | `validity`
`(package private) static ValidOffline` | `voffline`
`(package private) static ValidOnline` | `vonline`
`(package private) static ValidTransfer` | `vtransfer`

Constructor Summary
`test()`

Method Summary
`static void` | `main(String[] args)`
`(package private) static void` | `testAttributeCert()` test the AttributeCert and Certificate class.
`(package private) static void` | `testCapability5Tuple()` test the Capability5tuple class.
`(package private) static void` | `testCapabilityCert()` test the CapabilityCert and Certificate class.
`(package private) static void` | `testCBACChainReducer()` test the CBACChainReducer class.
`(package private) static void` | `testDate()` test the Date classes.
`(package private) static void` | `testEmpowerment()` test the Empowerment class.
`(package private) static void` | `testEscrow()` test the Escrow class.
`(package private) static void` | `testHash()` test the Hash class.
`(package private) static void` | `testIssuer()` test the Issuer class.
`(package private) static void` | `testKey()` test the KeyPairFactory, PublicKey, PrivateKey and Signature classes.
`(package private) static void` | `testName()` test the Principal interface, FQName, LocalName and RelativeName classes.
`(package private) static void` | `testNameCert()` test the NameCert and Certificate class.
`(package private) static void` | `testRBACChainReducer()` test the RBACChainReducer class.
`(package private) static void` | `testRole5Tuple()` test the Role5Tuple class.
`(package private) static void` | `testRoleCert()` test the RoleCert and Certificate class.
`(package private) static void` | `testSequence()` test the Sequence, SequenceDef, SequenceRef class.
`(package private) static void` | `testSomething()`
`(package private) static void` | `testSubjectAttribute()` test the SubjectAttribute class.
`(package private) static void` | `testSubjectCapability()` test the SubjectCapability class.
`(package private) static void` | `testSubjectName()` test the SubjectName class.
`(package private) static void` | `testSubjectRole()` test the SubjectRole class.
`(package private) static void` | `testSubjectTransfer()` test the SubjectTransfer class.
`(package private) static void` | `testTag()` test the Tag class.
`(package private) static void` | `testTransferCert()` test the TransferCert and Certificate class.
`(package private) static void` | `testTuple()` test the Tuple class.
`(package private) static void` | `testURIs()` test the URIs class.
`(package private) static void` | `testValidity()` test the Validity class.
`(package private) static void` | `testValidOffline()` test the ValidOffline class.
`(package private) static void` | `testValidOnline()` test the ValidOnline class.
`(package private) static void` | `testValidTransfer()` test the ValidTransfer class.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### __ME

    static String __ME

### messageString

    static String messageString

### tested

    static int tested

### passed

    static int passed

### PAUSE

    static boolean PAUSE

### HASH_ALG

    static String HASH_ALG

### PUB_ALG

    static String PUB_ALG

### BITS

    static int BITS

### PAIRS

    static int PAIRS

### PUBDB_PATH

    static String PUBDB_PATH

### PRIVDB_PATH

    static String PRIVDB_PATH

### TEST_ROUNDS

    static int TEST_ROUNDS

### uri

    static URIs uri

### hash

    static Hash hash

### keypairs

    static Key[][] keypairs

### pub

    static PublicKey pub

### priv

    static PrivateKey priv

### signature

    static Signature signature

### signature2

    static Signature signature2

### principal

    static Principal principal

### fqname

    static FQName fqname

### lname

    static LocalName lname

### rname

    static RelativeName rname

### pub_keydb

    static HashDB pub_keydb

### priv_keydb

    static HashDB priv_keydb

### issuer

    static Issuer issuer

### subj_cap

    static SubjectCapability subj_cap

### subj_role

    static SubjectRole subj_role

### subj_name

    static SubjectName subj_name

### subj_transf

    static SubjectTransfer subj_transf

### subj_attr

    static SubjectAttribute subj_attr

### empowerment

    static Empowerment empowerment

### escrow

    static Escrow escrow

### date

    static Date date

### date2

    static Date date2

### date3

    static Date date3

### date4

    static Date date4

### voffline

    static ValidOffline voffline

### vonline

    static ValidOnline vonline

### validity

    static Validity validity

### vtransfer

    static ValidTransfer vtransfer

### tag

    static Tag tag

### display_hint

    static Sexp display_hint

### issuer_loc

    static LocObj[] issuer_loc

### subj_loc

    static LocObj[] subj_loc

### comment

    static Sexp comment

### role_cert

    static RoleCert role_cert

### cert

    static Certificate cert

### cap_cert

    static CapabilityCert cap_cert

### transfer_cert

    static TransferCert transfer_cert

### name_cert

    static NameCert name_cert

### attr_cert

    static AttributeCert attr_cert

### seqdef

    static SequenceDef seqdef

### seqref

    static SequenceRef seqref

### sequence

    static Sequence sequence

### seq_entries

    static SeqEntry[] seq_entries

Constructor Detail

### test

    public test()

Method Detail

### main

    public static void main(String[] args)

### testURIs

    static void testURIs()

  test the URIs class. the following tests are performed:
  - construct a URIs object from an array of 3 Strings.
  - construct a URIs object from a single String.
  - export/restore URIs object to/from an S-Expression.

### testHash

    static void testHash()

  test the Hash class. the following tests are performed:
  - construct a SHA-1 Hash object from an input String.
  - compare two Hash objects.
  - construct a Hash object from existing hash value and a URIs object.
  - export/restore Hash object to/from an S-Expression.

### testKey

    static void testKey()

  test the KeyPairFactory, PublicKey, PrivateKey and Signature classes. the following tests are performed:
  - use KeyPairFactory to generate a number of key-pairs and measure averaged key-pair generation time.
  - export/restore PublicKey object to/from an S-Expression.
  - export/restore PrivateKey object to/from an S-Expression.
  - sign a hash value with the PrivateKey and measure averaged signing time.
  - sign an input String with the PrivateKey and measure averaged signing time.
  - verify the Signature with the PublicKey.
  - export/restore Signature object to/from an S-Expression.

### testName

    static void testName()

  test the Principal interface, FQName, LocalName and RelativeName classes. the following tests are performed:
  - construct an N-level FQName object from a Principal and an array of Strings and byte-array.
  - export/restore FQName object to/from an S-Expression.
  - construct a LocalName object from a Principal and a String.
  - construct a LocalName object from a Principal and a byte-array.
  - export/restore LocalName object to/from an S-Expression.
  - construct a RelativeName object from a String.
  - construct a RelativeName object from a byte-array.
  - export/restore RelativeName object to/from an S-Expression.

### testDate

    static void testDate()

  test the Date classes. the following tests are performed:
  - construct a Date object from a string.
  - construct a Date object from a java.util.Date object.
  - export/restore Date object to/from an S-Expression.

### testIssuer

    static void testIssuer()

  test the Issuer class. the following tests are performed:
  - construct an Issuer object from a Principal.
  - export/restore Issuer object to/from an S-Expression.

### testSubjectCapability

    static void testSubjectCapability()

  test the SubjectCapability class. the following tests are performed:
  - construct a SubjectCapability object from a Principal.
  - construct a SubjectCapability object from a RelativeName.
  - construct a SubjectCapability object from a LocalName.
  - export/restore SubjectCapability object to/from an S-Expression.

### testSubjectRole

    static void testSubjectRole()

  test the SubjectRole class. the following tests are performed:
  - construct a SubjectRole object from a Principal.
  - construct a SubjectRole object from a LocalName.
  - export/restore SubjectRole object to/from an S-Expression.

### testSubjectName

    static void testSubjectName()

  test the SubjectName class. the following tests are performed:
  - construct a SubjectName object from a Principal.
  - construct a SubjectName object from a RelativeName.
  - construct a SubjectName object from a LocalName.
  - export/restore SubjectName object to/from an S-Expression.

### testSubjectTransfer

    static void testSubjectTransfer()

  test the SubjectTransfer class. the following tests are performed:
  - construct a SubjectTransfer object from a Principal.
  - export/restore SubjectTransfer object to/from an S-Expression.

### testSubjectAttribute

    static void testSubjectAttribute()

  test the SubjectAttribute class. the following tests are performed:
  - construct a SubjectAttribute object from a Principal.
  - construct a SubjectAttribute object from a RelativeName.
  - construct a SubjectAttribute object from a LocalName.
  - construct a SubjectAttribute object from a Hash.
  - construct a SubjectAttribute object from a URIs.
  - export/restore SubjectAttribute object to/from an S-Expression.

### testEmpowerment

    static void testEmpowerment()

  test the Empowerment class. the following tests are performed:
  - construct a non-propagateable grant Empowerment object.
  - construct a transferable grant Empowerment object.
  - construct a delegateable grant Empowerment object.
  - construct a non-propagateable delegation Empowerment object.
  - construct a delegateable delegation Empowerment object.
  - export/restore Empowerment object to/from an S-Expression.

### testEscrow

    static void testEscrow()

  test the Escrow class. the following tests are performed:
  - construct a verified Escrow object.
  - construct a verified with a URIs Escrow object.
  - construct a to-verify with a Hash Escrow object.
  - export/restore Escrow object to/from an S-Expression.

### testValidOffline

    static void testValidOffline()

  test the ValidOffline class. the following tests are performed:
  - construct a ValidOffline object from a nonce String and a new-cert URIs.
  - export/restore ValidOffline object to/from an S-Expression.

### testValidOnline

    static void testValidOnline()

  test the ValidOnline class. the following tests are performed:
  - construct a ValidOnline object from a URIs and a Hash.
  - export/restore ValidOnline object to/from an S-Expression.

### testValidity

    static void testValidity()

  test the Validity class. the following tests are performed:
  - construct an always-valid Validity object.
  - construct an offline Validity object.
  - construct an online Validity object.
  - export/restore Validity object to/from an S-Expression.

### testValidTransfer

    static void testValidTransfer()

  test the ValidTransfer class. the following tests are performed:
  - construct a ValidTransfer object.
  - export/restore ValidTransfer object to/from an S-Expression.

### testTag

    static void testTag()

  test the Tag class. the following tests are performed:
  - construct an empty Tag object.
  - construct a wildcard Tag object.
  - construct a URI Tag object.
  - export/restore Tag object to/from an S-Expression.

### testRoleCert

    static void testRoleCert()

  test the RoleCert and Certificate class. the following tests are performed:
  - construct a RoleCert object.
  - export/restore RoleCert object to/from an S-Expression.
  - construct a Certificate object from a signed RoleCert.
  - export/restore Certificate object to/from an S-Expression.

### testCapabilityCert

    static void testCapabilityCert()

  test the CapabilityCert and Certificate class. the following tests are performed:
  - construct a CapabilityCert object.
  - export/restore CapabilityCert object to/from an S-Expression.
  - construct a Certificate object from a signed CapabilityCert.
  - export/restore Certificate object to/from an S-Expression.

### testTransferCert

    static void testTransferCert()

  test the TransferCert and Certificate class. the following tests are performed:
  - construct a TransferCert object.
  - export/restore TransferCert object to/from an S-Expression.
  - construct a Certificate object from a signed TransferCert.
  - export/restore Certificate object to/from an S-Expression.

### testNameCert

    static void testNameCert()

  test the NameCert and Certificate class. the following tests are performed:
  - construct a NameCert object.
  - export/restore NameCert object to/from an S-Expression.
  - construct a Certificate object from a signed NameCert.
  - export/restore Certificate object to/from an S-Expression.

### testAttributeCert

    static void testAttributeCert()

  test the AttributeCert and Certificate class. the following tests are performed:
  - construct a AttributeCert object.
  - export/restore AttributeCert object to/from an S-Expression.
  - construct a Certificate object from a signed AttributeCert.
  - export/restore Certificate object to/from an S-Expression.

### testSequence

    static void testSequence()

  test the Sequence, SequenceDef, SequenceRef class. the following tests are performed:
  - contruct a SequenceDef object from Certificate.
  - contruct a SequenceDef object from PublicKey.
  - export/restore SequenceDef object to/from an S-Expression.
  - contruct a SequenceRef object from PublicKey.
  - export/restore SequenceRef object to/from an S-Expression.
  - contruct a Sequenceob ject.
  - export/restore Sequence object to/from an S-Expression.

### testTuple

    static void testTuple()

  test the Tuple class. the following tests are performed:
  - test the SUnion() method with SubjectCapability and SubjectRole.
  - test the TEliminate() method with SubjectCapability and SubjectRole.
  - test the VIntersect() method.
  - test the EIntersect() method.

### testCapability5Tuple

    static void testCapability5Tuple()

  test the Capability5tuple class. the following tests are performed:
  - construc a Capability5Tuple object from CapabilityCert.
  - construc a Capability5Tuple object from TransferCert.
  - construc a Capability5Tuple object from RoleCert.
  - test the reduce() method.

### testRole5Tuple

    static void testRole5Tuple()

  test the Role5Tuple class. the following tests are performed:
  - construc a Role5Tuple object from RoleCert.
  - construc a Role5Tuple object from TransferCert.
  - test the reduce() method.

### testCBACChainReducer

    static void testCBACChainReducer()

  test the CBACChainReducer class. the following tests are performed:
  - reduce three difereent kinds of authorization chains and measure averaged reduction time for each auth-chain.

### testRBACChainReducer

    static void testRBACChainReducer()

  test the RBACChainReducer class. the following tests are performed:
  - reduce three difereent kinds of authorization chains and measure averaged reduction time for each auth-chain.

### testSomething

    static void testSomething()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD