KDF2.fromJson constructor
Implementation
factory KDF2.fromJson(Map<String, dynamic> json) {
if (json["prf"] != "hmac-sha256") {
throw Web3SecretStorageDefinationV3Exception("Invalid prf.",
details: {"excepted": "hmac-sha256", "prf": json["prf"]});
}
return KDF2(
iterations: json["c"],
salt: BytesUtils.fromHexString(json["salt"]),
dklen: json["dklen"],
);
}