Class sun.security.jsafe.DSA
All Packages Class Hierarchy This Package Previous Next Index
Class sun.security.jsafe.DSA
java.lang.Object
|
+----java.security.Signature
|
+----sun.security.jsafe.JSafeSig
|
+----sun.security.jsafe.DSA
- public final class DSA
- extends JSafeSig
-
DSA()
- Default constructor.
-
checkKeyAlg(AlgorithmId)
- Returns true if the key algorithm is one supported by this
signature algorithm.
-
getKeyGen()
- Returns a key generator object for the key algorithm
which was previously checked by checkKeyAlgorithm and
stored in the "keyAlg" member.
-
initSign(long)
- Initialize the BSAFE algorithm object "algObj" to do
SHA1-with-DSA signing, using private key "keyObj".
-
initVerify(long)
- Initialize the BSAFE algorithm object "algObj" to do
SHA1-with-DSA signature verificateion, using public
key "keyObj".
-
parsePrivateKey(byte[], String)
- Parses DSA private keys usin an algorithm-specific format.
DSA
public DSA()
- Default constructor. Establishes the signature algorithm
to be used.
checkKeyAlg
protected boolean checkKeyAlg(AlgorithmId keyAlg)
- Returns true if the key algorithm is one supported by this
signature algorithm.
Side effect: sets "siglimit" according to the size of the
signature generated with this algorithm and using this kind
of key.
XXX The side effect's a bit of a crock ... for DSA, BSAFE
defines it as a fixed value of 48. RSA needs an explcit
check with a key, not the algorithm.
- Overrides:
- checkKeyAlg in class JSafeSig
getKeyGen
protected KeyGen getKeyGen()
- Returns a key generator object for the key algorithm
which was previously checked by checkKeyAlgorithm and
stored in the "keyAlg" member.
- Overrides:
- getKeyGen in class JSafeSig
initSign
protected void initSign(long keyObj)
- Initialize the BSAFE algorithm object "algObj" to do
SHA1-with-DSA signing, using private key "keyObj".
- Overrides:
- initSign in class JSafeSig
initVerify
protected void initVerify(long keyObj)
- Initialize the BSAFE algorithm object "algObj" to do
SHA1-with-DSA signature verificateion, using public
key "keyObj".
- Overrides:
- initVerify in class JSafeSig
parsePrivateKey
protected void parsePrivateKey(byte privateKey[],
String format) throws InvalidKeyException
- Parses DSA private keys usin an algorithm-specific format. Private
keys are stored in a different format than public ones, to minimize
the risks associated with confusing the two.
- Parameters:
- privateKey - encoded bytes of the private key
- format - the format of the key
- Throws: InvalidKeyException
- if an error is encountered when
decoding the key, such as being given an illegal format key.
- Overrides:
- parsePrivateKey in class JSafeSig
All Packages Class Hierarchy This Package Previous Next Index