use of com.google.common.io.BaseEncoding in project graylog2-server by Graylog2.
the class Base64Decode method getEncodedValue.
@Override
protected String getEncodedValue(String value, boolean omitPadding) {
BaseEncoding encoding = BaseEncoding.base64();
encoding = omitPadding ? encoding.omitPadding() : encoding;
return new String(encoding.decode(value), StandardCharsets.UTF_8);
}
use of com.google.common.io.BaseEncoding in project graylog2-server by Graylog2.
the class Base64UrlDecode method getEncodedValue.
@Override
protected String getEncodedValue(String value, boolean omitPadding) {
BaseEncoding encoding = BaseEncoding.base64Url();
encoding = omitPadding ? encoding.omitPadding() : encoding;
return new String(encoding.decode(value), StandardCharsets.UTF_8);
}
use of com.google.common.io.BaseEncoding in project graylog2-server by Graylog2.
the class Base32Encode method getEncodedValue.
@Override
protected String getEncodedValue(String value, boolean omitPadding) {
BaseEncoding encoding = BaseEncoding.base32Hex();
encoding = omitPadding ? encoding.omitPadding() : encoding;
return encoding.encode(value.getBytes(StandardCharsets.UTF_8));
}
use of com.google.common.io.BaseEncoding in project graylog2-server by Graylog2.
the class Base32HumanEncode method getEncodedValue.
@Override
protected String getEncodedValue(String value, boolean omitPadding) {
BaseEncoding encoding = BaseEncoding.base32();
encoding = omitPadding ? encoding.omitPadding() : encoding;
return encoding.encode(value.getBytes(StandardCharsets.UTF_8));
}
use of com.google.common.io.BaseEncoding in project graylog2-server by Graylog2.
the class Base64Encode method getEncodedValue.
@Override
protected String getEncodedValue(String value, boolean omitPadding) {
BaseEncoding encoding = BaseEncoding.base64();
encoding = omitPadding ? encoding.omitPadding() : encoding;
return encoding.encode(value.getBytes(StandardCharsets.UTF_8));
}
Aggregations