decodeBase64Secret function

List<int> decodeBase64Secret(
  1. String value
)

Decodes a base64 secret leniently, like Node's Buffer.from(s, 'base64') which the pre-cutover TS signing flow used: CI secrets produced with the base64 CLI wrap at 64/76 columns, and Dart's strict decoder rejects the embedded newlines ("Invalid padding character").

Implementation

List<int> decodeBase64Secret(String value) {
  return base64Decode(value.replaceAll(RegExp(r'\s'), ''));
}