public static String digest(String algorithm, String text) {
return DigesterUtil.digest(algorithm, text);
}
public static String encrypt(Key key, String plainText)
throws EncryptorException {
<BUG>byte[] encryptedBytes = encryptRaw(key, plainText);
</BUG>
return Base64.encode(encryptedBytes);
}
<BUG>public static byte[] encrypt(Key key, byte[] plainBytes)
</BUG>
throws EncryptorException {

public static String digest(String algorithm, String text) {
return DigesterUtil.digest(algorithm, text);
}
public static String encrypt(Key key, String plainText)
throws EncryptorException {
byte[] encryptedBytes = encryptUnencoded(key, plainText);
return Base64.encode(encryptedBytes);
}
public static byte[] encryptUnencoded(Key key, byte[] plainBytes)
throws EncryptorException {
