Class KeyFactorySpi

    • Constructor Detail

      • KeyFactorySpi

        public KeyFactorySpi()
      • KeyFactorySpi

        public KeyFactorySpi​(JcaJceHelper helper)
    • Method Detail

      • engineTranslateKey

        protected java.security.Key engineTranslateKey​(java.security.Key key)
                                                throws java.security.InvalidKeyException
        Specified by:
        engineTranslateKey in class java.security.KeyFactorySpi
        Throws:
        java.security.InvalidKeyException
      • generatePrivate

        public java.security.PrivateKey generatePrivate​(PrivateKeyInfo keyInfo)
                                                 throws java.io.IOException
        Creates a CompositePrivateKey from its PrivateKeyInfo encoded form. It is compliant with https://www.ietf.org/archive/id/draft-ounsworth-pq-composite-sigs-13.html where CompositeSignaturePrivateKey is a sequence of two OneAsymmetricKey which a newer name for PrivateKeyInfo.
        Specified by:
        generatePrivate in interface AsymmetricKeyInfoConverter
        Parameters:
        keyInfo - PrivateKeyInfo containing a sequence of PrivateKeyInfos corresponding to each component.
        Returns:
        A CompositePrivateKey created from all components in the sequence.
        Throws:
        java.io.IOException
      • generatePublic

        public java.security.PublicKey generatePublic​(SubjectPublicKeyInfo keyInfo)
                                               throws java.io.IOException
        Creates a CompositePublicKey from its SubjectPublicKeyInfo encoded form. It is compliant with https://www.ietf.org/archive/id/draft-ounsworth-pq-composite-sigs-13.html where CompositeSignaturePublicKey is a sequence of two BIT STRINGs which contain the encoded component public keys. In BC implementation - CompositePublicKey is encoded into a BIT STRING in the form of SubjectPublicKeyInfo.
        Specified by:
        generatePublic in interface AsymmetricKeyInfoConverter
        Parameters:
        keyInfo - SubjectPublicKeyInfo containing a sequence of BIT STRINGs corresponding to each component.
        Returns:
        Throws:
        java.io.IOException