/*
* 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 */
/** @inheritDoc */
/** Field algorithm */
/**
* Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value.
*
* The JAVA JCE ECDSA 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>
* @see <A HREF="ftp://ftp.rfc-editor.org/in-notes/rfc4050.txt">3.3. ECDSA Signatures</A>
*/
throws IOException {
int i;
int j;
for (j = sLength;
throw new IOException("Invalid ASN.1 format of ECDSA signature");
}
byte xmldsigBytes[] = new byte[48];
i);
48 - j, j);
return xmldsigBytes;
}
/**
* Converts a XML Signature ECDSA Value to an ASN.1 DSA value.
*
* The JAVA JCE ECDSA 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>
* @see <A HREF="ftp://ftp.rfc-editor.org/in-notes/rfc4050.txt">3.3. ECDSA Signatures</A>
*/
throws IOException {
throw new IOException("Invalid XMLDSIG format of ECDSA 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;
}
/**
* Constructor SignatureRSA
*
* @throws XMLSignatureException
*/
try {
} else {
}
ex.getLocalizedMessage() };
} catch (NoSuchProviderException ex) {
ex.getLocalizedMessage() };
}
}
/** @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 (SignatureException ex) {
} catch (IOException 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) {
}
}
/** @inheritDoc */
return this._signatureAlgorithm.getAlgorithm();
}
/** @inheritDoc */
}
/** @inheritDoc */
throws XMLSignatureException {
throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
}
/** @inheritDoc */
protected void engineInitSign(
throws XMLSignatureException {
throw new XMLSignatureException(
"algorithms.CannotUseAlgorithmParameterSpecOnRSA");
}
/**
* Class SignatureRSASHA1
*
* @author $Author: mullan $
* @version $Revision: 1.2 $
*/
/**
* Constructor SignatureRSASHA1
*
* @throws XMLSignatureException
*/
super();
}
/** @inheritDoc */
}
}
}