Class DOMKeyValue.EC

  • All Implemented Interfaces:
    javax.xml.crypto.dsig.keyinfo.KeyValue, javax.xml.crypto.XMLStructure
    Enclosing class:
    DOMKeyValue<K extends java.security.PublicKey>

    static final class DOMKeyValue.EC
    extends DOMKeyValue<java.security.interfaces.ECPublicKey>
    • Field Detail

      • ecPublicKey

        private byte[] ecPublicKey
      • eckf

        private java.security.KeyFactory eckf
      • ecParams

        private java.security.spec.ECParameterSpec ecParams
    • Constructor Detail

      • EC

        EC​(java.security.interfaces.ECPublicKey ecKey)
        throws java.security.KeyException
        Throws:
        java.security.KeyException
      • EC

        EC​(org.w3c.dom.Element dmElem)
        throws javax.xml.crypto.MarshalException
        Throws:
        javax.xml.crypto.MarshalException
    • Method Detail

      • initializeCurve

        private static DOMKeyValue.EC.Curve initializeCurve​(java.lang.String name,
                                                            java.lang.String oid,
                                                            java.lang.String sfield,
                                                            java.lang.String a,
                                                            java.lang.String b,
                                                            java.lang.String x,
                                                            java.lang.String y,
                                                            java.lang.String n,
                                                            int h)
      • decodePoint

        private static java.security.spec.ECPoint decodePoint​(byte[] data,
                                                              java.security.spec.EllipticCurve curve)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • encodePoint

        private static byte[] encodePoint​(java.security.spec.ECPoint point,
                                          java.security.spec.EllipticCurve curve)
      • trimZeroes

        private static byte[] trimZeroes​(byte[] b)
      • getCurveOid

        private static java.lang.String getCurveOid​(java.security.spec.ECParameterSpec params)
      • matchCurve

        private static boolean matchCurve​(java.security.spec.ECParameterSpec params,
                                          DOMKeyValue.EC.Curve curve)
      • marshalPublicKey

        void marshalPublicKey​(org.w3c.dom.Node parent,
                              org.w3c.dom.Document doc,
                              java.lang.String dsPrefix,
                              javax.xml.crypto.dom.DOMCryptoContext context)
                       throws javax.xml.crypto.MarshalException
        Specified by:
        marshalPublicKey in class DOMKeyValue<java.security.interfaces.ECPublicKey>
        Throws:
        javax.xml.crypto.MarshalException
      • unmarshalKeyValue

        java.security.interfaces.ECPublicKey unmarshalKeyValue​(org.w3c.dom.Element kvtElem)
                                                        throws javax.xml.crypto.MarshalException
        Specified by:
        unmarshalKeyValue in class DOMKeyValue<java.security.interfaces.ECPublicKey>
        Throws:
        javax.xml.crypto.MarshalException
      • getECParameterSpec

        private static java.security.spec.ECParameterSpec getECParameterSpec​(java.lang.String oid)