Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

optimization enhancement #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ var cryptico = (function() {
// Converts a string to a byte array.
my.string2bytes = function(string)
{
var bytes = new Array();
var bytes = new Array(string.length);
for(var i = 0; i < string.length; i++)
{
bytes.push(string.charCodeAt(i));
bytes[i] = string.charCodeAt(i);
}
return bytes;
}
Expand Down
4 changes: 2 additions & 2 deletions cryptico.js
Original file line number Diff line number Diff line change
Expand Up @@ -3316,10 +3316,10 @@ var cryptico = (function() {
// Converts a string to a byte array.
my.string2bytes = function(string)
{
var bytes = new Array();
var bytes = new Array(string.length);
for(var i = 0; i < string.length; i++)
{
bytes.push(string.charCodeAt(i));
bytes[i] = string.charCodeAt(i);
}
return bytes;
}
Expand Down
4 changes: 2 additions & 2 deletions cryptico.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.