Class KeyPairAlgorithm


  • public class KeyPairAlgorithm
    extends Algorithm
    Algorithms that can be used for keypair generation.
    • Constructor Detail

      • KeyPairAlgorithm

        protected KeyPairAlgorithm​(int oidIndex,
                                   java.lang.String name,
                                   Algorithm algFamily)
    • Method Detail

      • getAlgFamily

        public Algorithm getAlgFamily()
        Returns the algorithm family for a given key pair generation algorithm. If a token supports a family and is writable, we can do keypair gen on the token even if it doesn't support the keypair gen algorithm. We do this by doing the keypair gen on the internal module and then moving the key out to the other token.
        Returns:
        Algorithm family.
      • fromString

        public static KeyPairAlgorithm fromString​(java.lang.String algName)
                                           throws java.security.NoSuchAlgorithmException
        Looks up a key pair generation algorithm from its name. The names are those specified in the JCA spec. For example, "RSA" and "DSA".
        Parameters:
        algName - Algorithm name.
        Returns:
        Key pair generation algorithm.
        Throws:
        java.security.NoSuchAlgorithmException - If the name of the algorithm is not recognized as a supported algorithm.