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

## com.ibm.atp.auth
Class SharedSecrets

    java.lang.Object
      |
      +--com.ibm.atp.auth.SharedSecrets

public final class SharedSecrets
extends java.lang.Object

The `SharedSecrets` class is a collection of SharedSecret objects.

Version:
  1.00 $Date: 2001/07/28 06:33:48 $
Author:
  ONO Kouichi

Constructor Summary
`protected` | `SharedSecrets()` Constructor creates a secure random generator, and generate byte sequence as a shared secret (password) for authentication.

Method Summary
`void` | `addSharedSecret(SharedSecret secret)` Adds a shared secret.
`protected static SharedSecrets` | `convertLinesToSharedSecrets(java.util.Enumeration lines)` Converts lines into shared secrets.
`protected static SharedSecrets` | `createSharedSecretsFile()` Creates shared secrets file.
`protected static SharedSecrets` | `createSharedSecretsFile(java.lang.String filename)` Creates shared secrets file.
`java.util.Enumeration` | `getDomainNames()` Gets domain names of shared secrets.
`SharedSecret` | `getSharedSecret(java.lang.String domainName)` Gets a shared secret.
`static SharedSecrets` | `getSharedSecrets()` Gets shared secrets.
`boolean` | `isEmpty()` Check empty.
`protected static SharedSecrets` | `load()` Loads shared secrets.
`protected static SharedSecrets` | `load(java.lang.String filename)` Loads shared secrets.
`void` | `removeSharedSecret(java.lang.String domainName)` Removes a shared secret.
`void` | `save()` Saves to file.
`void` | `save(java.lang.String filename)` Saves to file.
`java.util.Enumeration` | `secrets()` Gets shared secrets.
`protected SharedSecret` | `selectSharedSecret(java.util.Enumeration domainNames)` Selects a shared secret.
`java.util.Enumeration` | `toLines()` Returns lines representation of the shared secret.
`java.lang.String` | `toString()` Returns a string representation of the shared secrets.

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

Constructor Detail

### SharedSecrets

    protected SharedSecrets()

  Constructor creates a secure random generator, and generate byte sequence as a shared secret (password) for authentication.

Method Detail

### addSharedSecret

    public void addSharedSecret(SharedSecret secret)

  Adds a shared secret.
  Parameters:
    `secret` - a shared secret

### convertLinesToSharedSecrets

    protected static final SharedSecrets convertLinesToSharedSecrets(java.util.Enumeration lines)

  Converts lines into shared secrets.

### createSharedSecretsFile

    protected static SharedSecrets createSharedSecretsFile()

  Creates shared secrets file.
  Returns:
    created shared secrets NOT NEEDED ???????(HT)

### createSharedSecretsFile

    protected static SharedSecrets createSharedSecretsFile(java.lang.String filename)

  Creates shared secrets file.
  Parameters:
    `filename` - filename of the shared secrets file to be created
  Returns:
    created shared secrets NOT NEEDED????(HT)

### getDomainNames

    public java.util.Enumeration getDomainNames()

  Gets domain names of shared secrets.
  Returns:
    enumeration of domain names of shared secrets

### getSharedSecret

    public SharedSecret getSharedSecret(java.lang.String domainName)

  Gets a shared secret.
  Parameters:
    `domainName` - domain name of the shared secret
  Returns:
    shared secret whose domain is the specified domain name

### getSharedSecrets

    public static SharedSecrets getSharedSecrets()

  Gets shared secrets.
  Returns:
    loaded shared secrets. If not loaded, load shared secrets from file and return it.

### isEmpty

    public final boolean isEmpty()

  Check empty.
  Returns:
    true if empty, otherwise false

### load

    protected static SharedSecrets load()

  Loads shared secrets.
  Returns:
    loaded shared secrets

### load

    protected static SharedSecrets load(java.lang.String filename)

  Loads shared secrets.
  Parameters:
    `filename` - filename of the shared secrets file to be loaded
  Returns:
    loaded shared secrets

### removeSharedSecret

    public void removeSharedSecret(java.lang.String domainName)

  Removes a shared secret.
  Parameters:
    `domainName` - domain name of the shared secret to be removed

### save

    public void save()

  Saves to file.

### save

    public void save(java.lang.String filename)

  Saves to file.
  Parameters:
    `filename` - filename of the shared secrets file to be saved

### secrets

    public java.util.Enumeration secrets()

  Gets shared secrets.
  Returns:
    enumeration of shared secrets

### selectSharedSecret

    protected SharedSecret selectSharedSecret(java.util.Enumeration domainNames)

  Selects a shared secret.
  Parameters:
    `domainNames` - enumeration of domain names
  Returns:
    a shared secret whose domain name is a member of specified domain names

### toLines

    public java.util.Enumeration toLines()

  Returns lines representation of the shared secret.
  Returns:
    lines representation of the shared secret

### toString

    public java.lang.String toString()

  Returns a string representation of the shared secrets.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of the shared secrets

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