idToCurve function

String idToCurve(
  1. int id
)

Get the curve name from the curve ID.

Implementation

String idToCurve(int id) {
  switch (id) {
    case 0:
      return 'ed25519';
    case 1:
      return 'P256';
    case 2:
      return 'secp256k1';
    default:
      throw 'Curve ID not supported';
  }
}