| Index: tools/dom/templates/html/impl/impl_Crypto.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_Crypto.darttemplate b/tools/dom/templates/html/impl/impl_Crypto.darttemplate
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1da09bb0eafb1512c5924a1f1a23d1b137e40181
|
| --- /dev/null
|
| +++ b/tools/dom/templates/html/impl/impl_Crypto.darttemplate
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +part of $LIBRARYNAME;
|
| +
|
| +$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
|
| +
|
| + TypedData getRandomValues(TypedData array) {
|
| +$if DART2JS
|
| + return _getRandomValues(array);
|
| +$else
|
| + 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;
|
| +$endif
|
| + }
|
| +
|
| +$!MEMBERS
|
| +}
|
|
|