Package craterdog.utils
Class Base32Utils
java.lang.Object
craterdog.utils.Base32Utils
This utility class provides functions for encoding and decoding byte arrays
using base 32. The character set used for the encoding includes the following
characters: 0..9 A..D F..H J..N P..T V..Z
- Author:
- Derk Norton
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
This function decodes a base 32 string into its corresponding byte array.static String
encode
(byte[] bytes) This function encodes a byte array using base 32 with no indentation of new lines.static String
This function encodes a byte array using base 32 with a specific indentation of new lines.
-
Method Details
-
encode
This function encodes a byte array using base 32 with no indentation of new lines.- Parameters:
bytes
- The byte array to be encoded.- Returns:
- The base 32 encoded string.
-
encode
This function encodes a byte array using base 32 with a specific indentation of new lines.- Parameters:
bytes
- The byte array to be encoded.indentation
- The indentation string to be inserted before each new line.- Returns:
- The base 32 encoded string.
-
decode
This function decodes a base 32 string into its corresponding byte array.- Parameters:
base32
- The base 32 encoded string.- Returns:
- The corresponding byte array.
-