Class SignatureDSA

    • Constructor Detail

      • SignatureDSA

        public SignatureDSA()
      • SignatureDSA

        protected SignatureDSA​(java.lang.String algorithm)
    • Method Detail

      • sign

        public byte[] sign​(SessionContext session)
                    throws java.lang.Exception
        Description copied from interface: Signature
        Compute the signature
        Specified by:
        sign in interface Signature
        Overrides:
        sign in class AbstractSignature
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        Returns:
        The signature value
        Throws:
        java.lang.Exception - If failed to calculate the signature
      • putBigInteger

        public static void putBigInteger​(java.math.BigInteger value,
                                         byte[] result,
                                         int offset)
      • verify

        public boolean verify​(SessionContext session,
                              byte[] sig)
                       throws java.lang.Exception
        Description copied from interface: Signature
        Verify against the given signature
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        sig - The signed data
        Returns:
        true if signature is valid
        Throws:
        java.lang.Exception - If failed to extract signed data for validation