-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate (UTF8) compatibility with bcrypt, fixes #4
- Loading branch information
Showing
8 changed files
with
201 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
File renamed without changes.
File renamed without changes.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (c) 2012 Nevins Bartolomeo <[email protected]> | ||
Copyright (c) 2012 Shane Girish <[email protected]> | ||
Copyright (c) 2013 Daniel Wirtz <[email protected]> | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
3. The name of the author may not be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
var path = require("path"), | ||
bcrypt = require(path.join(__dirname, "dist", "bcrypt.js")); | ||
|
||
module.exports = bcrypt; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "bcryptjs", | ||
"description": "Optimized bcrypt in plain JavaScript with zero dependencies. 100% typed code. Fully compatible to 'bcrypt'.", | ||
"version": "1.0.0-pre", | ||
"version": "1.0.0", | ||
"author": "Daniel Wirtz <[email protected]>", | ||
"contributors": [ | ||
"Shane Girish <[email protected]> (https://github.com/shaneGirish)", | ||
|
@@ -26,18 +26,19 @@ | |
"crypt", | ||
"crypto" | ||
], | ||
"main": "./bcrypt.min.js", | ||
"main": "index.js", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"testjs": "latest", | ||
"preprocessor": "latest", | ||
"closurecompiler": "latest" | ||
"closurecompiler": "latest", | ||
"bcrypt": "latest" | ||
}, | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"test": "node node_modules/testjs/bin/testjs", | ||
"build": "preprocess ./src/bcrypt.js ./src > ./bcrypt.js", | ||
"compile": "ccjs bcrypt.js --warning_level=VERBOSE --compilation_level=ADVANCED_OPTIMIZATIONS --externs=externs/minimal-env.js > bcrypt.min.js", | ||
"build": "preprocess ./src/bcrypt.js ./src > ./dist/bcrypt.js", | ||
"compile": "ccjs dist/bcrypt.js --warning_level=VERBOSE --compilation_level=ADVANCED_OPTIMIZATIONS --externs=externs/minimal-env.js > dist/bcrypt.min.js", | ||
"make": "npm run-script build && npm run-script compile && npm test" | ||
} | ||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
Sentences that contain all letters commonly used in a language | ||
-------------------------------------------------------------- | ||
|
||
Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> -- 2012-04-11 | ||
|
||
This is an example of a plain-text file encoded in UTF-8. | ||
|
||
|
||
Danish (da) | ||
--------- | ||
|
||
Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen | ||
Wolther spillede på xylofon. | ||
(= Quiz contestants were eating strawbery with cream while Wolther | ||
the circus clown played on xylophone.) | ||
|
||
German (de) | ||
----------- | ||
|
||
Falsches Üben von Xylophonmusik quält jeden größeren Zwerg | ||
(= Wrongful practicing of xylophone music tortures every larger dwarf) | ||
|
||
Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich | ||
(= Twelve boxing fighters hunted Eva across the dike of Sylt) | ||
|
||
Heizölrückstoßabdämpfung | ||
(= fuel oil recoil absorber) | ||
(jqvwxy missing, but all non-ASCII letters in one word) | ||
|
||
Greek (el) | ||
---------- | ||
|
||
Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο | ||
(= No more shall I see acacias or myrtles in the golden clearing) | ||
|
||
Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία | ||
(= I uncover the soul-destroying abhorrence) | ||
|
||
English (en) | ||
------------ | ||
|
||
The quick brown fox jumps over the lazy dog | ||
|
||
Spanish (es) | ||
------------ | ||
|
||
El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y | ||
frío, añoraba a su querido cachorro. | ||
(Contains every letter and every accent, but not every combination | ||
of vowel + acute.) | ||
|
||
French (fr) | ||
----------- | ||
|
||
Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à | ||
côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce | ||
qui lui permet de penser à la cænogenèse de l'être dont il est question | ||
dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui, | ||
pense-t-il, diminue çà et là la qualité de son œuvre. | ||
|
||
l'île exiguë | ||
Où l'obèse jury mûr | ||
Fête l'haï volapük, | ||
Âne ex aéquo au whist, | ||
Ôtez ce vœu déçu. | ||
|
||
Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en | ||
canoë au delà des îles, près du mälström où brûlent les novæ. | ||
|
||
Irish Gaelic (ga) | ||
----------------- | ||
|
||
D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh | ||
|
||
Hungarian (hu) | ||
-------------- | ||
|
||
Árvíztűrő tükörfúrógép | ||
(= flood-proof mirror-drilling machine, only all non-ASCII letters) | ||
|
||
Icelandic (is) | ||
-------------- | ||
|
||
Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa | ||
|
||
Sævör grét áðan því úlpan var ónýt | ||
(some ASCII letters missing) | ||
|
||
Japanese (jp) | ||
------------- | ||
|
||
Hiragana: (Iroha) | ||
|
||
いろはにほへとちりぬるを | ||
わかよたれそつねならむ | ||
うゐのおくやまけふこえて | ||
あさきゆめみしゑひもせす | ||
|
||
Katakana: | ||
|
||
イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム | ||
ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン | ||
|
||
Hebrew (iw) | ||
----------- | ||
|
||
? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה | ||
|
||
Polish (pl) | ||
----------- | ||
|
||
Pchnąć w tę łódź jeża lub ośm skrzyń fig | ||
(= To push a hedgehog or eight bins of figs in this boat) | ||
|
||
Russian (ru) | ||
------------ | ||
|
||
В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! | ||
(= Would a citrus live in the bushes of south? Yes, but only a fake one!) | ||
|
||
Съешь же ещё этих мягких французских булок да выпей чаю | ||
(= Eat some more of these fresh French loafs and have some tea) | ||
|
||
Thai (th) | ||
--------- | ||
|
||
[--------------------------|------------------------] | ||
๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน | ||
จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร | ||
ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย | ||
ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ | ||
|
||
[The copyright for the Thai example is owned by The Computer | ||
Association of Thailand under the Royal Patronage of His Majesty the | ||
King.] | ||
|
||
Turkish (tr) | ||
------------ | ||
|
||
Pijamalı hasta, yağız şoföre çabucak güvendi. | ||
(=Patient with pajamas, trusted swarthy driver quickly) | ||
|
||
|
||
Special thanks to the people from all over the world who contributed | ||
these sentences since 1999. | ||
|
||
A much larger collection of such pangrams is now available at | ||
|
||
http://en.wikipedia.org/wiki/List_of_pangrams | ||
|
This file contains 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 characters