convertToBase32 static method

List<int> convertToBase32(
  1. List<int> data
)

Converts the input data to base32 encoding.

Parameters:

  • data: The input data to be converted to base32.

Returns: A List

Throws:

  • ArgumentException: If the data cannot be converted to base32.

Implementation

static List<int> convertToBase32(List<int> data) {
  final List<int>? convData = _convertBits(data, 8, 5);
  if (convData == null) {
    throw const ArgumentException(
        'Invalid data, cannot perform conversion to base32');
  }

  return convData;
}