code: private static void hashAttribute(Attribute a, MessageDigest dig) {
          dig.update(a.getId().toString().getBytes());
          dig.update(a.getType().toString().getBytes());
          dig.update(a.getValue().encode().getBytes());
          if (a.getIssuer() != null) {
              dig.update(a.getIssuer().getBytes());
          }
          if (a.getIssueInstant() != null) {
              dig.update(a.getIssueInstant().encode().getBytes());
          }
      }
docs: Utility function to add an attribute to the hash digest.
  
  @param a
  the attribute to hash