cryptojs: fixed tests

This commit is contained in:
Igor Oleinikov
2013-12-22 14:47:48 +04:00
parent 4fce4a3a03
commit a5ed7728b1
7 changed files with 14 additions and 14 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);