getRandomValues method

TypedData getRandomValues(TypedData array)

Source

TypedData getRandomValues(TypedData array) {
  var random = _getRandomValues(array);
  // The semantics of the operation are that it modifies the argument, but we
  // have no way of making a Dart typed data created initially in Dart reference
  // externalized storage. So we copy the values back from the returned copy.
  // TODO(alanknight): Make this less ridiculously slow.
  for (var i = 0; i < random.length; i++) {
    array[i] = random[i];
  }
  return array;
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/Crypto/getRandomValues.html