/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/**
*
* @author $Author: mullan $
*/
/** {@link java.util.logging} logging facility */
/** Field _URI */
/** Field algorithm */
/**
* Method engineGetURI
*
* @inheritDoc
*/
return SignatureDSA._URI;
}
/**
* Constructor SignatureDSA
*
* @throws XMLSignatureException
*/
try {
} else {
this._signatureAlgorithm =
}
}
}
/**
* @inheritDoc
*/
throws XMLSignatureException {
try {
} catch (InvalidAlgorithmParameterException ex) {
}
}
/**
* @inheritDoc
*/
throws XMLSignatureException {
try {
} catch (SignatureException ex) {
} catch (IOException ex) {
}
}
/**
* @inheritDoc
*/
throw new XMLSignatureException
("algorithms.WrongKeyForThisOperation", exArgs);
}
try {
} catch (InvalidKeyException ex) {
// reinstantiate Signature object to work around bug in JDK
try {
} catch (Exception e) {
// this shouldn't occur, but if it does, restore previous
// Signature
}
this._signatureAlgorithm = sig;
}
}
}
/**
* @inheritDoc
*/
try {
} catch (IOException ex) {
} catch (SignatureException ex) {
}
}
/**
* @inheritDoc
*/
throws XMLSignatureException {
if (!(privateKey instanceof PrivateKey)) {
throw new XMLSignatureException
("algorithms.WrongKeyForThisOperation", exArgs);
}
try {
} catch (InvalidKeyException ex) {
}
}
/**
* @inheritDoc
*/
if (!(privateKey instanceof PrivateKey)) {
throw new XMLSignatureException
("algorithms.WrongKeyForThisOperation", exArgs);
}
try {
} catch (InvalidKeyException ex) {
}
}
/**
* @inheritDoc
*/
try {
} catch (SignatureException ex) {
}
}
/**
* @inheritDoc
*/
try {
} catch (SignatureException ex) {
}
}
/**
* @inheritDoc
*/
throws XMLSignatureException {
try {
} catch (SignatureException ex) {
}
}
/**
* Method engineGetJCEAlgorithmString
*
* @inheritDoc
*/
return this._signatureAlgorithm.getAlgorithm();
}
/**
* Method engineGetJCEProviderName
*
* @inheritDoc
*/
}
/**
* Converts an ASN.1 DSA value to a XML Signature DSA Value.
*
* The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
* pairs; the XML Signature requires the core BigInteger values.
*
* @param asn1Bytes
* @return the decode bytes
*
* @throws IOException
* @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
*/
throws IOException {
int i;
int j;
for (j = sLength;
throw new IOException("Invalid ASN.1 format of DSA signature");
}
byte xmldsigBytes[] = new byte[40];
i);
40 - j, j);
return xmldsigBytes;
}
/**
* Converts a XML Signature DSA Value to an ASN.1 DSA value.
*
* The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
* pairs; the XML Signature requires the core BigInteger values.
*
* @param xmldsigBytes
* @return the encoded ASN.1 bytes
*
* @throws IOException
* @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
*/
throws IOException {
throw new IOException("Invalid XMLDSIG format of DSA signature");
}
int i;
int j = i;
j += 1;
}
int k;
int l = k;
l += 1;
}
byte asn1Bytes[] = new byte[6 + j + l];
asn1Bytes[3] = (byte) j;
asn1Bytes[5 + j] = (byte) l;
return asn1Bytes;
}
/**
* Method engineSetHMACOutputLength
*
* @param HMACOutputLength
* @throws XMLSignatureException
*/
throws XMLSignatureException {
throw new XMLSignatureException(
"algorithms.HMACOutputLengthOnlyForHMAC");
}
/**
* Method engineInitSign
*
* @param signingKey
* @param algorithmParameterSpec
* @throws XMLSignatureException
*/
protected void engineInitSign(
throws XMLSignatureException {
throw new XMLSignatureException(
"algorithms.CannotUseAlgorithmParameterSpecOnDSA");
}
}