1 package com.atlassian.activeobjects.util;
2
3 /**
4 * A simple interface to get digests of any {@link String}
5 */
6 public interface Digester {
7 /**
8 * Digests the String into another String
9 *
10 * @param s the String to digest
11 * @return the digested String
12 * @see #digest(String, int)
13 */
14 String digest(String s);
15
16 /**
17 * Digest the String into another String, keeping at most the last {@code n} characters of the digested String
18 *
19 * @param s the String to digest
20 * @param n the number of 'last' characters to keep
21 * @return the digested String
22 */
23 String digest(String s, int n);
24 }