Class KeyAgentIdentity

    • Method Detail

      • getComment

        public String getComment()
      • sign

        public Map.Entry<String,​byte[]> sign​(SessionContext session,
                                                   String algo,
                                                   byte[] data)
                                            throws Exception
        Description copied from interface: PublicKeyIdentity
        Proves the public key identity by signing the given data
        Specified by:
        sign in interface PublicKeyIdentity
        Parameters:
        session - The SessionContext for calling this method - may be null if not called within a session context
        algo - Recommended signature algorithm - if null/empty then one will be selected based on the key type and/or signature factories. Note: even if specific algorithm specified, the implementation may disregard and choose another
        data - Data to sign
        Returns:
        used algorithm + signed data - using the identity
        Throws:
        Exception - If failed to sign the data