importAesKey function
Implementation
Future<crypto.AesGcmSecretKey> importAesKey(String key,
[ByteBuffer? salt, DefaultAESKey? opt]) async {
opt ??= DEFAULT_OPTS;
final combo = key + (salt?.asUint8List() ?? Shims.random(8)).toString();
final hash = await sha256(combo);
final jwkKey = keyToJwk(hash);
return crypto.AesGcmSecretKey.importJsonWebKey(jwkKey.toJson());
}