Class AbstractSecurityKeySignature

    • Constructor Detail

      • AbstractSecurityKeySignature

        protected AbstractSecurityKeySignature​(String keyType)
    • Method Detail

      • update

        public void update​(SessionContext session,
                           byte[] hash,
                           int off,
                           int len)
        Description copied from interface: Signature
        Update the computed signature with the given data
        Specified by:
        update in interface Signature
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        hash - The hash data buffer
        off - Offset of hash data in buffer
        len - Length of hash data
      • getSignatureKeyType

        protected abstract String getSignatureKeyType()
      • getDelegateSignature

        protected abstract Signature getDelegateSignature()
      • verify

        public boolean verify​(SessionContext session,
                              byte[] sig)
                       throws Exception
        Description copied from interface: Signature
        Verify against the given signature
        Specified by:
        verify in interface 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:
        Exception - If failed to extract signed data for validation
      • sign

        public byte[] sign​(SessionContext session)
        Description copied from interface: Signature
        Compute the signature
        Specified by:
        sign in interface Signature
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        Returns:
        The signature value