Curve.fromLabel constructor

Curve.fromLabel(String label)

Implementation

factory Curve.fromLabel(String label) {
  switch (label) {
    case 'P-224':
      return p224;
    case 'P-256':
      return p256;
    case 'P-384':
      return p384;
    case 'P-521':
      return p521;
    case 'sm2p256v1':
      return sm2p256v1;
    case 'ed25519':
      return ed25519;
    default:
      throw ArgumentError('Unsupported label');
  }
}