class Base32Encoder {

  public static byte[] getBytes(final String base32String) {
    final Base32 codec = new Base32();
    final byte[] encodedBytes = StringEncoder.getBytes(base32String);
    if (!codec.isInAlphabet(encodedBytes, true)) {
      throw new IllegalArgumentException("malformed base32 string passed to getBytes");
    }
    return codec.decode(encodedBytes);
  }

  private  Base32Encoder();

}