Last active
August 29, 2015 14:19
-
-
Save hueitan/e0b04af4e4bc1376e099 to your computer and use it in GitHub Desktop.
Revisions
-
Huei Tan revised this gist
Apr 29, 2015 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,4 +30,15 @@ for (;j<6;O += o) O += d == o ? '.' : d return O.trim() ``` best answer from someone else ```js m = arguments[0] i = 6 r = '' for (; i; i && (r += ' ')) for (j = -i--; j < m.length-i; r += t > ' ' ? t : '.') t = m[j += 6] || '.' return r ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,15 +19,15 @@ function arr_encryption(msg) { } ``` 105 char ```js m = arguments[j=0] while(m.length %6) m += O=o=' ' for (;j<6;O += o) for (i=j++;d=m[i];i+=6) O += d == o ? '.' : d return O.trim() ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 7 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,17 +19,15 @@ function arr_encryption(msg) { } ``` 111 char ```js m = arguments[j=k=0] while(k++<m.length %6) m += O=' ' for (;j<6;O += ' ') for (i=j++;d=m[i];i+=6) O += d == ' ' ? '.' : d return O.trim() ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function arr_encryption(msg) { } ``` 117 char (haizzz..) ```js m = arguments[j=k=0] -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ while(k++<m.length %6) for (;j<6;O += ' ') for (i=j++;m[i];i+=6) O += m[i] == ' ' ? '.' : m[i] return O.trim() ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,17 +19,17 @@ function arr_encryption(msg) { } ``` 119 char (haizzz..) ```js m = arguments[j=k=0] while(k++<m.length %6) m += ' ' O = '' for (;j<6;O += ' ') for (i=j++;m[i];i+=6) O += (m[i] == ' ') ? '.' : m[i] return O.trim() ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,13 +23,13 @@ function arr_encryption(msg) { ```js m = arguments[j=k=0] for (;k<m.length % 6;k++) m += ' ' O = '' for (;j<6;j++, O += ' ') for (i=j;m[i];i+=6) O += / /.test(m[i]) ? '.' : m[i] return O.trim() ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,4 +17,19 @@ function arr_encryption(msg) { } return output; } ``` 125 char (haizzz..) ```js m = arguments[j=k=0] for (;k<m.length % 6;k++) m += ' ' O = '' for (;j<6;j++, O += ' ') for (i=j;m[i];i+=6) O += / /.test(m[i]) ? '.' : m[i] return O.trim() ``` -
Huei Tan revised this gist
Apr 22, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,12 @@ function arr_encryption(msg) { var message = msg.split(' ').join('.'), output = ''; // add . if needed for (k=0;k<message.length % 6;k++) { message += '.'; } // [Attack.at.noon] => change for (j=0;j<6;j++) { for (i=j;i<message.length;i+=6) { output += message[i]; -
Huei Tan created this gist
Apr 22, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ ```js function arr_encryption(msg) { var message = msg.split(' ').join('.'), output = ''; for (k=0;k<message.length % 6;k++) { message += '.'; } for (j=0;j<6;j++) { for (i=j;i<message.length;i+=6) { output += message[i]; } if (j<5)output += ' '; } return output; } ```