public synchronized String sha(String input, String sugar) {
		String result = null;
		if (input != null) {
			try {
				if (digest == null) {
					digest = MessageDigest.getInstance("SHA-256");
				} else {
					digest.reset();
				}
				if (sugar != null) {
					digest.update(sugar.getBytes());
				}
				digest.update(input.getBytes());
				byte[] output = digest.digest();
				result = bytesToHex(output);
			} catch (NoSuchAlgorithmException e) {
				logger.severe("Error while creating a MessageDigester for algorithm: " + "SHA-256");
			} finally {
				if (digest != null) {
					digest.reset();
				}
			}
		}
		return result;
	}