Class KeyAlgorithm<U extends java.security.PublicKey,​R extends java.security.PrivateKey>

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected KeyAlgorithm​(java.lang.String signatureAlgorithm, java.lang.String keyFormat, java.lang.Class<R> keyType)  
      protected KeyAlgorithm​(java.lang.String signatureAlgorithm, java.lang.String keyFormat, java.lang.Class<R> keyType, java.security.Provider provider)  
    • Constructor Detail

      • KeyAlgorithm

        protected KeyAlgorithm​(java.lang.String signatureAlgorithm,
                               java.lang.String keyFormat,
                               java.lang.Class<R> keyType)
      • KeyAlgorithm

        protected KeyAlgorithm​(java.lang.String signatureAlgorithm,
                               java.lang.String keyFormat,
                               java.lang.Class<R> keyType,
                               java.security.Provider provider)
    • Method Detail

      • generateSignature

        public byte[] generateSignature​(byte[] message,
                                        R pk,
                                        java.security.SecureRandom rnd)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • verifySignature

        public boolean verifySignature​(byte[] message,
                                       byte[] ds,
                                       U dpk)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getKeyFormat

        public java.lang.String getKeyFormat()
      • encodeSignature

        public abstract byte[] encodeSignature​(byte[] signature)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeSignature

        public abstract byte[] decodeSignature​(byte[] encodedSignature)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • encodePublicKey

        public abstract byte[] encodePublicKey​(U publicKey)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodePublicKey

        public abstract java.security.PublicKey decodePublicKey​(byte[] encodedPublicKey)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getCertificateDecoders

        public abstract java.util.List<CertificateDecoder> getCertificateDecoders()
      • supportsKey

        public boolean supportsKey​(java.security.PrivateKey key)