|
13 | 13 |
|
14 | 14 | /* eslint-disable strict */ |
15 | 15 |
|
16 | | -;(function(expect, md5) { |
| 16 | +;(function (expect, md5) { |
17 | 17 | 'use strict' |
18 | 18 |
|
19 | | - describe('MD5 Hex-encoding', function() { |
20 | | - it('should create a hex-encoded MD5 hash of an ASCII value', function() { |
| 19 | + describe('MD5 Hex-encoding', function () { |
| 20 | + it('should create a hex-encoded MD5 hash of an ASCII value', function () { |
21 | 21 | expect(md5('value')).to.equal('2063c1608d6e0baf80249c42e2be5804') |
22 | 22 | }) |
23 | 23 |
|
24 | | - it('should create a hex-encoded MD5 hash of an UTF-8 value', function() { |
| 24 | + it('should create a hex-encoded MD5 hash of an UTF-8 value', function () { |
25 | 25 | expect(md5('日本')).to.equal('4dbed2e657457884e67137d3514119b3') |
26 | 26 | }) |
27 | 27 | }) |
28 | 28 |
|
29 | | - describe('HMAC-MD5 Hex-encoding', function() { |
30 | | - it('should create a hex-encoded HMAC-MD5 hash of an ASCII value and key', function() { |
| 29 | + describe('HMAC-MD5 Hex-encoding', function () { |
| 30 | + it('should create a hex-encoded HMAC-MD5 hash of an ASCII value and key', function () { |
31 | 31 | expect(md5('value', 'key')).to.equal('01433efd5f16327ea4b31144572c67f6') |
32 | 32 | }) |
33 | 33 |
|
34 | | - it('should create a hex-encoded HMAC-MD5 hash of an UTF-8 value and key', function() { |
| 34 | + it('should create a hex-encoded HMAC-MD5 hash of an UTF-8 value and key', function () { |
35 | 35 | expect(md5('日本', '日本')).to.equal('c78b8c7357926981cc04740bd3e9d015') |
36 | 36 | }) |
37 | 37 | }) |
38 | 38 |
|
39 | | - describe('MD5 raw encoding', function() { |
40 | | - it('should create a raw MD5 hash of an ASCII value', function() { |
| 39 | + describe('MD5 raw encoding', function () { |
| 40 | + it('should create a raw MD5 hash of an ASCII value', function () { |
41 | 41 | expect(md5('value', null, true)).to.equal( |
42 | 42 | ' c\xc1`\x8dn\x0b\xaf\x80$\x9cB\xe2\xbeX\x04' |
43 | 43 | ) |
44 | 44 | }) |
45 | 45 |
|
46 | | - it('should create a raw MD5 hash of an UTF-8 value', function() { |
| 46 | + it('should create a raw MD5 hash of an UTF-8 value', function () { |
47 | 47 | expect(md5('日本', null, true)).to.equal( |
48 | 48 | 'M\xbe\xd2\xe6WEx\x84\xe6q7\xd3QA\x19\xb3' |
49 | 49 | ) |
50 | 50 | }) |
51 | 51 | }) |
52 | 52 |
|
53 | | - describe('HMAC-MD5 raw encoding', function() { |
54 | | - it('should create a raw HMAC-MD5 hash of an ASCII value and key', function() { |
| 53 | + describe('HMAC-MD5 raw encoding', function () { |
| 54 | + it('should create a raw HMAC-MD5 hash of an ASCII value and key', function () { |
55 | 55 | expect(md5('value', 'key', true)).to.equal( |
56 | 56 | '\x01C>\xfd_\x162~\xa4\xb3\x11DW,g\xf6' |
57 | 57 | ) |
58 | 58 | }) |
59 | 59 |
|
60 | | - it('should create a raw HMAC-MD5 hash of an UTF-8 value and key', function() { |
| 60 | + it('should create a raw HMAC-MD5 hash of an UTF-8 value and key', function () { |
61 | 61 | expect(md5('日本', '日本', true)).to.equal( |
62 | 62 | '\xc7\x8b\x8csW\x92i\x81\xcc\x04t\x0b\xd3\xe9\xd0\x15' |
63 | 63 | ) |
|
0 commit comments