All Packages Class Hierarchy This Package Previous Next Index
Class jnfs.security.DSAChallenge
java.lang.Object
|
+----jnfs.security.DSAChallenge
- public class DSAChallenge
- extends Object
- implements Challenge
A Challenge implemented using DSA signatures.
- Version:
- $Id: DSAChallenge.java,v 1.18 1997/05/20 19:16:20 mjr Exp $
- Author:
- Michael John Radwin
-
DSAChallenge(String, SecureRandom)
- Creates a challenge with a default number of random bytes.
-
DSAChallenge(String, SecureRandom, int)
- Creates a challenge with
length
random bytes.
-
bytes()
- Returns a copy of the random bytes associated with this challenge.
-
equals(Object)
- Tests for equality of Challenges.
-
issueResponse(PrivateKey)
- Uses the
PrivateKey
to sign this challenge and returns
a new Response
which contains the signed version of
this challenge.
-
user()
- Returns the name of the user associated with this challenge.
-
verifyResponse(Response, PublicKey)
-
Uses the
PublicKey
to verify that the
Response
is a signed version of this
challenge.
DSAChallenge
public DSAChallenge(String user,
SecureRandom rand)
- Creates a challenge with a default number of random bytes.
- See Also:
- generateChallenge
DSAChallenge
public DSAChallenge(String user,
SecureRandom rand,
int length)
- Creates a challenge with
length
random bytes.
- See Also:
- generateChallenge
user
public String user()
- Returns the name of the user associated with this challenge.
bytes
public byte[] bytes()
- Returns a copy of the random bytes associated with this challenge.
equals
public boolean equals(Object other)
- Tests for equality of Challenges.
- Overrides:
- equals in class Object
issueResponse
public synchronized Response issueResponse(PrivateKey privkey) throws InvalidKeyException
- Uses the
PrivateKey
to sign this challenge and returns
a new Response
which contains the signed version of
this challenge. Typically called from the client.
- Throws: InvalidKeyException
- if the key is invalid.
verifyResponse
public synchronized boolean verifyResponse(Response credentials,
PublicKey pubkey) throws InvalidKeyException
- Uses the
PublicKey
to verify that the
Response
is a signed version of this
challenge. Typically called from the server.
- Throws: InvalidKeyException
- if the key is invalid.
All Packages Class Hierarchy This Package Previous Next Index