Class AbstractBufferPublicKeyParser<PUB extends java.security.PublicKey>

    • Field Detail

      • keyClass

        private final java.lang.Class<PUB extends java.security.PublicKey> keyClass
      • supported

        private final java.util.Collection<java.lang.String> supported
    • Constructor Detail

      • AbstractBufferPublicKeyParser

        protected AbstractBufferPublicKeyParser​(java.lang.Class<PUB> keyClass,
                                                java.lang.String... supported)
      • AbstractBufferPublicKeyParser

        protected AbstractBufferPublicKeyParser​(java.lang.Class<PUB> keyClass,
                                                java.util.Collection<java.lang.String> supported)
    • Method Detail

      • getSupportedKeyTypes

        public java.util.Collection<java.lang.String> getSupportedKeyTypes()
      • getKeyClass

        public final java.lang.Class<PUB> getKeyClass()
      • isKeyTypeSupported

        public boolean isKeyTypeSupported​(java.lang.String keyType)
        Specified by:
        isKeyTypeSupported in interface BufferPublicKeyParser<PUB extends java.security.PublicKey>
        Parameters:
        keyType - The key type - e.g., "ssh-rsa", "ssh-dss"
        Returns:
        true if this key type is supported by the parser
      • generatePublicKey

        protected <S extends java.security.spec.KeySpec> PUB generatePublicKey​(java.lang.String algorithm,
                                                                               S keySpec)
                                                                        throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • getKeyFactory

        protected java.security.KeyFactory getKeyFactory​(java.lang.String algorithm)
                                                  throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object