001
014
015 package com.liferay.portal.kernel.util;
016
017 import java.nio.ByteBuffer;
018
019
024 public interface Digester {
025
026 public static final String DEFAULT_ALGORITHM = "SHA";
027
028 public static final String ENCODING = StringPool.UTF8;
029
030 public static final String MD5 = "MD5";
031
032 public static final String SHA = "SHA";
033
034 public static final String SHA_1 = "SHA-1";
035
036 public String digest(ByteBuffer byteBuffer);
037
038 public String digest(String text);
039
040 public String digest(String algorithm, ByteBuffer byteBuffer);
041
042 public String digest(String algorithm, String... text);
043
044 public String digestBase64(ByteBuffer byteBuffer);
045
046 public String digestBase64(String text);
047
048 public String digestBase64(String algorithm, ByteBuffer byteBuffer);
049
050 public String digestBase64(String algorithm, String... text);
051
052 public String digestHex(ByteBuffer byteBuffer);
053
054 public String digestHex(String text);
055
056 public String digestHex(String algorithm, ByteBuffer byteBuffer);
057
058 public String digestHex(String algorithm, String... text);
059
060 public byte[] digestRaw(ByteBuffer byteBuffer);
061
062 public byte[] digestRaw(String text);
063
064 public byte[] digestRaw(String algorithm, ByteBuffer byteBuffer);
065
066 public byte[] digestRaw(String algorithm, String... text);
067
068 }