From ddfdf46397b3894ef98a70b4de1bbccbf39a381b Mon Sep 17 00:00:00 2001 From: MIZUNE Pine Date: Sat, 30 Aug 2014 10:22:37 +0900 Subject: [PATCH 1/2] Add md5 --- md5/md5-test.ts | 9 +++++++++ md5/md5.d.ts | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 md5/md5-test.ts create mode 100644 md5/md5.d.ts diff --git a/md5/md5-test.ts b/md5/md5-test.ts new file mode 100644 index 000000000..036ad9c2a --- /dev/null +++ b/md5/md5-test.ts @@ -0,0 +1,9 @@ +/// + +var hash: string; +hash = CybozuLabs.MD5.calc("abc"); +hash = CybozuLabs.MD5.calc("abc", CybozuLabs.MD5.BY_ASCII); +hash = CybozuLabs.MD5.calc("abc", CybozuLabs.MD5.BY_UTF16); + +var version: string; +version = CybozuLabs.MD5.VERSION; \ No newline at end of file diff --git a/md5/md5.d.ts b/md5/md5.d.ts new file mode 100644 index 000000000..207a30699 --- /dev/null +++ b/md5/md5.d.ts @@ -0,0 +1,11 @@ +// Type definitions for CybozuLabs.MD5 +// Project: http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html +// Definitions by: MIZUNE Pine +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module CybozuLabs.MD5 { + var VERSION: string; + var BY_ASCII: number; + var BY_UTF16: number; + function calc(str: string, option?: number): string; +} \ No newline at end of file From 06c9171176cbefcf0ad53b6d567a7bfa16fa7183 Mon Sep 17 00:00:00 2001 From: MIZUNE Pine Date: Sun, 31 Aug 2014 06:33:09 +0900 Subject: [PATCH 2/2] Add name into CONTRIBUTORS.md --- CONTRIBUTORS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bb0933af5..bcf912187 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -240,7 +240,8 @@ All definitions files include a header with the author and editors, so at some p * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) * [MathJax](https://github.com/mathjax/MathJax) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) (by [Sarah Williams](https://github.com/flurg)) -* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) +* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) +* [md5.js](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) (by [MIZUNE Pine](https://github.com/pine613)) * [Microsoft Ajax](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) (by [Patrick Magee](https://github.com/pjmagee)) * [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) (by [John Vilk](https://github.com/jvilk)) * [Minimatch](https://github.com/isaacs/minimatch) (by [vvakame](https://github.com/vvakame))