fromSecretKey static method

MLDSAParams fromSecretKey(
  1. List<int> skBytes
)

Implementation

static MLDSAParams fromSecretKey(List<int> skBytes) {
  final length = skBytes.length;
  return [mldsa44Params, mldsa65Params, mldsa87Params].firstWhere(
    (e) => e.secretKeyBytes == length,
    orElse:
        () =>
            throw CoreErrors.cryptoFailed(
              "MLDSAParams.fromPublicKey",
              reason: "Invalid or unsupported public key bytes length.",
            ),
  );
}