A binary-to-text translating utility supporting custom sets of characters. It's similar to java.util.Base64 but you supply the set of characters which will represent the binary data.
Rebaserrebaser = newRebaser();
char[] charset = "abc123".toCharArray();
StringencodedData = rebaser.encode("Hog Island".getBytes(), charset);
System.out.println(encodedData); // bacabc11bcb1acaabacbb1a1bc1abcabbc1cbcbabyte[] decodedBytes = rebaser.decode(encodedData, charset);
System.out.println(newString(decodedBytes)); // Hog IslandAdd the JitPack Maven repository to your list of repositories:
repositories {
...
maven { url 'https://jitpack.io' }
}
Add the compile dependency:
dependencies {
...
compile 'com.github.codebandits:rebaser:master-SNAPSHOT'
}