Class SignatureRSA

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.security.KeyFactory keyFactory  
      (package private) java.security.Signature signature  
    • Constructor Summary

      Constructors 
      Constructor Description
      SignatureRSA()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init()  
      void setPrvKey​(byte[] d, byte[] n)  
      void setPubKey​(byte[] e, byte[] n)  
      byte[] sign()  
      void update​(byte[] foo)  
      boolean verify​(byte[] sig)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • signature

        java.security.Signature signature
      • keyFactory

        java.security.KeyFactory keyFactory
    • Constructor Detail

      • SignatureRSA

        public SignatureRSA()
    • Method Detail

      • init

        public void init()
                  throws java.lang.Exception
        Specified by:
        init in interface Signature
        Throws:
        java.lang.Exception
      • setPubKey

        public void setPubKey​(byte[] e,
                              byte[] n)
                       throws java.lang.Exception
        Specified by:
        setPubKey in interface SignatureRSA
        Throws:
        java.lang.Exception
      • setPrvKey

        public void setPrvKey​(byte[] d,
                              byte[] n)
                       throws java.lang.Exception
        Specified by:
        setPrvKey in interface SignatureRSA
        Throws:
        java.lang.Exception
      • sign

        public byte[] sign()
                    throws java.lang.Exception
        Specified by:
        sign in interface Signature
        Throws:
        java.lang.Exception
      • update

        public void update​(byte[] foo)
                    throws java.lang.Exception
        Specified by:
        update in interface Signature
        Throws:
        java.lang.Exception
      • verify

        public boolean verify​(byte[] sig)
                       throws java.lang.Exception
        Specified by:
        verify in interface Signature
        Throws:
        java.lang.Exception