fromString static method

SigningAlgorithm? fromString(
  1. String? value
)

Parses a string into a SigningAlgorithm.

Returns null if the string does not match a known algorithm.

Implementation

static SigningAlgorithm? fromString(final String? value) {
  if (value == null) return null;
  final upper = value.toUpperCase();
  for (final alg in SigningAlgorithm.values) {
    if (alg.label == upper) return alg;
  }
  return null;
}