mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
cryptojs: fixed tests
This commit is contained in:
@@ -63,9 +63,9 @@ YUI.add('algo-aes-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
@@ -87,9 +87,9 @@ YUI.add('algo-des-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
@@ -15,9 +15,9 @@ YUI.add('pad-iso10126-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
@@ -63,9 +63,9 @@ YUI.add('algo-rabbit-legacy-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
@@ -67,9 +67,9 @@ YUI.add('algo-rabbit-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
@@ -51,9 +51,9 @@ YUI.add('algo-rc4-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
@@ -71,9 +71,9 @@ YUI.add('algo-tripledes-test', function (Y) {
|
||||
|
||||
// Replace random method with one that returns a predictable value
|
||||
C.lib.WordArray.random = function (nBytes) {
|
||||
var words = [];
|
||||
var words: number[] = [];
|
||||
for (var i = 0; i < nBytes; i += 4) {
|
||||
words.push([0x11223344]);
|
||||
words.push(0x11223344);
|
||||
}
|
||||
|
||||
return C.lib.WordArray.create(words, nBytes);
|
||||
|
||||
Reference in New Issue
Block a user