Search in sources :

Example 21 with BaseEncoding

use of com.google.common.io.BaseEncoding in project graylog2-server by Graylog2.

the class Base32HumanDecode method getEncodedValue.

@Override
protected String getEncodedValue(String value, boolean omitPadding) {
    BaseEncoding encoding = BaseEncoding.base32();
    encoding = omitPadding ? encoding.omitPadding() : encoding;
    return new String(encoding.decode(value), StandardCharsets.UTF_8);
}
Also used : BaseEncoding(com.google.common.io.BaseEncoding)

Aggregations

BaseEncoding (com.google.common.io.BaseEncoding)21 HashFunction (com.google.common.hash.HashFunction)3 IOException (java.io.IOException)2 Test (org.junit.Test)2 GoogleJsonError (com.google.api.client.googleapis.json.GoogleJsonError)1 GenericUrl (com.google.api.client.http.GenericUrl)1 HttpHeaders (com.google.api.client.http.HttpHeaders)1 HttpRequest (com.google.api.client.http.HttpRequest)1 HttpRequestFactory (com.google.api.client.http.HttpRequestFactory)1 HttpResponse (com.google.api.client.http.HttpResponse)1 LowLevelHttpResponse (com.google.api.client.http.LowLevelHttpResponse)1 JsonHttpContent (com.google.api.client.http.json.JsonHttpContent)1 JsonFactory (com.google.api.client.json.JsonFactory)1 Insert (com.google.api.services.storage.Storage.Objects.Insert)1 StorageObject (com.google.api.services.storage.model.StorageObject)1 AppIdentityService (com.google.appengine.api.appidentity.AppIdentityService)1 Artifact (com.google.devtools.build.lib.actions.Artifact)1 TreeFileArtifact (com.google.devtools.build.lib.actions.Artifact.TreeFileArtifact)1 Gson (com.google.gson.Gson)1 Salt (edu.stanford.bmir.protege.web.shared.auth.Salt)1