parse static method

ApkHashAlgorithm parse(
  1. String? value
)

Implementation

static ApkHashAlgorithm parse(String? value) {
  switch (value?.trim().toLowerCase().replaceAll('-', '')) {
    case null:
    case '':
    case 'md5':
      return ApkHashAlgorithm.md5;
    case 'sha256':
      return ApkHashAlgorithm.sha256;
    default:
      throw FormatException('Unsupported APK hash algorithm: $value');
  }
}