scrypt method

Derives key from password and key using scrypt algorithm. See https://en.wikipedia.org/wiki/Scrypt.

Arguments

  • log_n - The log2 of the Scrypt parameter N
  • r - The Scrypt parameter r
  • p - The Scrypt parameter p

Conditions

  • log_n must be less than 64
  • r must be greater than 0 and less than or equal to 4294967295
  • p must be greater than 0 and less than 4294967295

Recommended values sufficient for most use-cases

  • log_n = 15 (n = 32768)
  • r = 8
  • p = 1

Implementation

Future<ResultOfScrypt> scrypt(ParamsOfScrypt params) async {
  final res = await _tonCore.request('crypto.scrypt', params.toString());
  return ResultOfScrypt.fromMap(res);
}