public String encodePassword(String password) throws NoSuchAlgorithmException {
		// compute digest of the password
		final MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
		messageDigest.update(password.getBytes(StandardCharsets.UTF_8));
		// we need a SALT against rainbow tables
		messageDigest.update(SALT);
		final byte[] digest = messageDigest.digest();
		// hexadecimal encoding of the digest
		return "{" + algorithm + '}' + hexa(digest);
	}
@Test
	public void testEncodePassword() throws NoSuchAlgorithmException {
		final String algorithm = "SHA-256";
		final String password = "password";
		final String hash = new MessageDigestPasswordEncoder(algorithm).encodePassword(password);
		final String expectedHash = "{SHA-256}c33d66fe65ffcca1f2260e6982dbf0c614b6ea3ddfdb37d6142fbec0feca5245";
		assertEquals("encodePassword", expectedHash, hash);
	}