public static void maskPropertiesIfNecessary(Properties properties) {
		Assert.notNull(properties, "'properties' must not be null.");

		for (Entry<Object, Object> property : properties.entrySet()) {
			if (property.getKey() instanceof String && property.getValue() instanceof String) {
				final String propertyKey = (String) property.getKey();
				final String propertyValue = (String) property.getValue();

				for (String param : PasswordUtils.PASSWORD_PARAMETER_NAMES) {
					if (propertyKey.toLowerCase().contains(param.toLowerCase())) {
						properties.setProperty(propertyKey,
								PasswordUtils.maskString(propertyValue));
					}
				}
			}
		}
	}
Will mask property values if they contain keys that contain the values specified
in {@link PasswordUtils#PASSWORD_PARAMETER_NAMES}.

Be aware that this is a mutable operation and the passed-in {@link Properties}
will be modified.

@param properties Must not be null.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/PasswordUtils.java