fromSeed static method

Key fromSeed({
  1. required KeyAlgorithm algorithm,
  2. required Uint8List seed,
  3. KeyMethod method = KeyMethod.none,
})

Creates a new deterministic key or keypair from a seed.

Throws an AskarKeyException if key creation fails.

Implementation

static Key fromSeed({
  required KeyAlgorithm algorithm,
  required Uint8List seed,
  KeyMethod method = KeyMethod.none,
}) {
  try {
    return Key(askarKeyFromSeed(algorithm, seed, method).value);
  } catch (e) {
    throw AskarKeyException('Error getting key from seed: $e');
  }
}