encodeModifiedBase64 static method

String encodeModifiedBase64(
  1. String string
)

Encodes the given string with the modified base64 algorithm defined in rfc 2152

Implementation

static String encodeModifiedBase64(String string) {
  var out = <int>[];
  for (var i = 0; i < string.length; i++) {
    out.add(string.codeUnitAt(i) >> 8);
    out.add(string.codeUnitAt(i) & 0xFF);
  }
  return base64Encode(out).replaceAll('=', '');
}