code: private static UserIdentifier createUserIdentifier(
        OfflineDataUploadUserIdentifierType identifierType, String value)
        throws UnsupportedEncodingException {
      // If the user identifier type is a hashed type, also call hash function
      // on the value.
      if (HASHED_IDENTIFIER_TYPES.contains(identifierType)) {
        value = toSHA256String(value);
      }
      UserIdentifier userIdentifier = new UserIdentifier();
      userIdentifier.setUserIdentifierType(identifierType);
      userIdentifier.setValue(value);
      return userIdentifier;
    }
docs: Returns a new user identifier with the specified type and value.