org.apache.xml.security.stax.impl.algorithms
Class ECDSAUtils
java.lang.Object
org.apache.xml.security.stax.impl.algorithms.ECDSAUtils
public final class ECDSAUtils
- extends Object
- Version:
- $Revision: 1181995 $ $Date: 2011-10-11 19:03:00 +0100 (Tue, 11 Oct 2011) $
- Author:
- $Author: coheigea $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
convertASN1toXMLDSIG
public static byte[] convertASN1toXMLDSIG(byte[] asn1Bytes)
throws IOException
- 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.
- Parameters:
asn1Bytes -
- Returns:
- the decode bytes
- Throws:
IOException- See Also:
- 6.4.1 DSA,
3.3. ECDSA Signatures
convertXMLDSIGtoASN1
public static byte[] convertXMLDSIGtoASN1(byte[] xmldsigBytes)
throws IOException
- 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.
- Parameters:
xmldsigBytes -
- Returns:
- the encoded ASN.1 bytes
- Throws:
IOException- See Also:
- 6.4.1 DSA,
3.3. ECDSA Signatures
getOIDFromPublicKey
public static String getOIDFromPublicKey(ECPublicKey ecPublicKey)
getECCurveDefinition
public static ECDSAUtils.ECCurveDefinition getECCurveDefinition(String oid)
encodePoint
public static byte[] encodePoint(ECPoint ecPoint,
EllipticCurve ellipticCurve)
decodePoint
public static ECPoint decodePoint(byte[] encodedBytes,
EllipticCurve elliptiCcurve)
stripLeadingZeros
public static byte[] stripLeadingZeros(byte[] bytes)
Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.