Class KeypairGenerator

    • Constructor Detail

      • KeypairGenerator

        public KeypairGenerator()
    • Method Detail

      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • initialize

        public void initialize​(String conf,
                               org.xipki.password.PasswordResolver passwordResolver)
                        throws XiSecurityException
        Initializes me.
        Parameters:
        conf - Configuration. Could be null.
        passwordResolver - Password resolver. Could be null.
        Throws:
        XiSecurityException - if error during the initialization occurs.
      • initialize0

        protected abstract void initialize0​(org.xipki.util.ConfPairs conf,
                                            org.xipki.password.PasswordResolver passwordResolver)
                                     throws XiSecurityException
        Throws:
        XiSecurityException
      • supports

        public boolean supports​(String keyspec)
      • generateKeypair

        public abstract org.bouncycastle.asn1.pkcs.PrivateKeyInfo generateKeypair​(String keyspec)
                                                                           throws XiSecurityException
        Generate keypair for the given keyspec as defined in RFC 5958.
        Parameters:
        keyspec - Key specification. It has the following format:
        • RSA: 'RSA/'<bit-length> or 'RSA/'<bit-length>
        • DSA: 'DSA/'<bit-lenth of P>'/'<bit-lenth of Q>
        • EC: 'EC/'<curve OID>
        • EdDSA: 'ED25519' or 'ED448'
        • XDH: 'X25519' or 'X448'
        Returns:
        the generated keypair.
        Throws:
        XiSecurityException - if could not generate keypair.
      • isHealthy

        public abstract boolean isHealthy()