OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 "use strict"; | 18 "use strict"; |
19 | 19 |
20 const {createSandbox} = require("./_common"); | 20 const {createSandbox, silenceWarnOutput} = require("./_common"); |
21 | 21 |
22 let verifySignature = null; | 22 let verifySignature = null; |
23 | 23 |
24 exports.setUp = function(callback) | 24 exports.setUp = function(callback) |
25 { | 25 { |
26 let sandboxedRequire = createSandbox(); | 26 let sandboxedRequire = createSandbox(); |
27 ( | 27 ( |
28 {verifySignature} = sandboxedRequire("../lib/rsa") | 28 {verifySignature} = sandboxedRequire("../lib/rsa") |
29 ); | 29 ); |
30 | 30 |
(...skipping 14 matching lines...) Expand all Loading... |
45 -----END RSA PRIVATE KEY----- | 45 -----END RSA PRIVATE KEY----- |
46 */ | 46 */ |
47 | 47 |
48 let data = "test"; | 48 let data = "test"; |
49 let publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALZc50pEXnz9TSRozwM04rryuaXl/
wgUFqV9FHq8HDlkdKvRU0hXhb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQ=="; | 49 let publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALZc50pEXnz9TSRozwM04rryuaXl/
wgUFqV9FHq8HDlkdKvRU0hXhb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQ=="; |
50 let signature = "LzKJE1BOsZDfwD/hncHq+MN5ZygIemb1Pyzx40rm3CoTL4CVPAicS1mOiTv6s
9Li9Vw1ds9HwFWVMFVEwHwfIw=="; | 50 let signature = "LzKJE1BOsZDfwD/hncHq+MN5ZygIemb1Pyzx40rm3CoTL4CVPAicS1mOiTv6s
9Li9Vw1ds9HwFWVMFVEwHwfIw=="; |
51 test.ok(verifySignature(publicKey, signature, data), "Correct signature"); | 51 test.ok(verifySignature(publicKey, signature, data), "Correct signature"); |
52 | 52 |
53 test.ok(!verifySignature(publicKey, signature, data + "1"), "Wrong data"); | 53 test.ok(!verifySignature(publicKey, signature, data + "1"), "Wrong data"); |
54 test.ok(!verifySignature(publicKey, signature, data.substr(0, 3)), "Wrong data
"); | 54 test.ok(!verifySignature(publicKey, signature, data.substr(0, 3)), "Wrong data
"); |
55 test.ok(!verifySignature(publicKey, signature.substr(0, 5) + "0" + signature.s
ubstr(6), data), "Wrong signature"); | 55 test.ok(!silenceWarnOutput( |
56 test.ok(!verifySignature(publicKey.substr(0, 5) + "R" + publicKey.substr(6), s
ignature, data), "Wrong public key"); | 56 () => verifySignature(publicKey, signature.substr(0, 5) + "0" + signature.su
bstr(6), data), |
57 test.ok(!verifySignature(publicKey.substr(0, 70) + "8" + publicKey.substr(71),
signature, data), "Wrong public key"); | 57 "Invalid encrypted signature: Wrong padding in signature digest" |
| 58 ), "Wrong signature"); |
| 59 test.ok(!silenceWarnOutput( |
| 60 () => verifySignature(publicKey.substr(0, 5) + "R" + publicKey.substr(6), si
gnature, data), |
| 61 "Invalid RSA public key: Unexpected type" |
| 62 ), "Wrong public key"); |
| 63 test.ok(!silenceWarnOutput( |
| 64 () => verifySignature(publicKey.substr(0, 70) + "8" + publicKey.substr(71),
signature, data), |
| 65 "Invalid encrypted signature: Wrong padding in signature digest" |
| 66 ), "Wrong public key"); |
58 | 67 |
59 test.done(); | 68 test.done(); |
60 }; | 69 }; |
61 | 70 |
62 exports.test2048bitSigningKey = function(test) | 71 exports.test2048bitSigningKey = function(test) |
63 { | 72 { |
64 /* | 73 /* |
65 -----BEGIN RSA PRIVATE KEY----- | 74 -----BEGIN RSA PRIVATE KEY----- |
66 MIIEowIBAAKCAQEAy45IKQw0R5YBiIFyfKftx3F/6WsvtdNMnCKodkDemXuJOcFu | 75 MIIEowIBAAKCAQEAy45IKQw0R5YBiIFyfKftx3F/6WsvtdNMnCKodkDemXuJOcFu |
67 Of/KeIjED/wW2DFG8qq72FAByUUFoTLcmawQZPd2htmHIk8ZkBRsaQ8HzNoK+vg4 | 76 Of/KeIjED/wW2DFG8qq72FAByUUFoTLcmawQZPd2htmHIk8ZkBRsaQ8HzNoK+vg4 |
(...skipping 23 matching lines...) Expand all Loading... |
91 -----END RSA PRIVATE KEY----- | 100 -----END RSA PRIVATE KEY----- |
92 */ | 101 */ |
93 | 102 |
94 let data = "test"; | 103 let data = "test"; |
95 let publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy45IKQw0R5YBiIFyf
Kftx3F/6WsvtdNMnCKodkDemXuJOcFuOf/KeIjED/wW2DFG8qq72FAByUUFoTLcmawQZPd2htmHIk8Zk
BRsaQ8HzNoK+vg4wnI6yN/2lhSP27D4XpedG3mtbG8aYtMuqyQaxWHInSqiM4tqW/8coAPXrRTKYmsFf
AwPB1LCg5QI3vCy7Vdbbp907xOXON1+2seF9j8m9rh0sufXgGNWcvTNUvlf/TidSVjqxe6O3hG9jTOsw
C8/hez7rbiLroVNnCtIDrdX6OSM/je/XSMMnS5xpZBuqZGZtZm1Mr42omgst+KE+5dE6kyx76ra8LwsC
EShawIDAQAB"; | 104 let publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy45IKQw0R5YBiIFyf
Kftx3F/6WsvtdNMnCKodkDemXuJOcFuOf/KeIjED/wW2DFG8qq72FAByUUFoTLcmawQZPd2htmHIk8Zk
BRsaQ8HzNoK+vg4wnI6yN/2lhSP27D4XpedG3mtbG8aYtMuqyQaxWHInSqiM4tqW/8coAPXrRTKYmsFf
AwPB1LCg5QI3vCy7Vdbbp907xOXON1+2seF9j8m9rh0sufXgGNWcvTNUvlf/TidSVjqxe6O3hG9jTOsw
C8/hez7rbiLroVNnCtIDrdX6OSM/je/XSMMnS5xpZBuqZGZtZm1Mr42omgst+KE+5dE6kyx76ra8LwsC
EShawIDAQAB"; |
96 let signature = "UYTQmygOICKi4ozlMbLSYFZ1olovZZFYT0nZygPrGoA+6+ta+wzKnPnghK4j3
5QSucrf3yN8DSXa/kXBX0LcTmEaSwoNRuM7QPjT6v9hNsVjwNexOUk6pR3DotYuD1yV36sITNjx59McG
8/q6qLyj2A8KVlUbtnz/IiLzzw+wgy6WRjU1meYP8oiQGVIkB21ICqqaJ5kCvM0YrAqzQKAya513O51A
DA6aC/EMz6B62XGgZ+AywUMcH2Wvx7cyCvPVLfAbXcgex1JtpPS6vGcdpigaVQkoyl4cIQmX1ppasgJj
2MiYl2htXvFXjYoWniEmspteNu3UybB0nMHnYjKdQ=="; | 105 let signature = "UYTQmygOICKi4ozlMbLSYFZ1olovZZFYT0nZygPrGoA+6+ta+wzKnPnghK4j3
5QSucrf3yN8DSXa/kXBX0LcTmEaSwoNRuM7QPjT6v9hNsVjwNexOUk6pR3DotYuD1yV36sITNjx59McG
8/q6qLyj2A8KVlUbtnz/IiLzzw+wgy6WRjU1meYP8oiQGVIkB21ICqqaJ5kCvM0YrAqzQKAya513O51A
DA6aC/EMz6B62XGgZ+AywUMcH2Wvx7cyCvPVLfAbXcgex1JtpPS6vGcdpigaVQkoyl4cIQmX1ppasgJj
2MiYl2htXvFXjYoWniEmspteNu3UybB0nMHnYjKdQ=="; |
97 test.ok(verifySignature(publicKey, signature, data), "Correct signature"); | 106 test.ok(verifySignature(publicKey, signature, data), "Correct signature"); |
98 | 107 |
99 test.ok(!verifySignature(publicKey, signature, data + "1"), "Wrong data"); | 108 test.ok(!verifySignature(publicKey, signature, data + "1"), "Wrong data"); |
100 test.ok(!verifySignature(publicKey, signature, data.substr(0, 3)), "Wrong data
"); | 109 test.ok(!verifySignature(publicKey, signature, data.substr(0, 3)), "Wrong data
"); |
101 test.ok(!verifySignature(publicKey, signature.substr(0, 5) + "0" + signature.s
ubstr(6), data), "Wrong signature"); | 110 test.ok(!silenceWarnOutput( |
102 test.ok(!verifySignature(publicKey.substr(0, 5) + "R" + publicKey.substr(6), s
ignature, data), "Wrong public key"); | 111 () => verifySignature(publicKey, signature.substr(0, 5) + "0" + signature.su
bstr(6), data), |
103 test.ok(!verifySignature(publicKey.substr(0, 70) + "8" + publicKey.substr(71),
signature, data), "Wrong public key"); | 112 "Invalid encrypted signature: Wrong padding in signature digest" |
| 113 ), "Wrong signature"); |
| 114 test.ok(!silenceWarnOutput( |
| 115 () => verifySignature(publicKey.substr(0, 5) + "R" + publicKey.substr(6), si
gnature, data), |
| 116 "Invalid RSA public key: Unexpected type" |
| 117 ), "Wrong public key"); |
| 118 test.ok(!silenceWarnOutput( |
| 119 () => verifySignature(publicKey.substr(0, 70) + "8" + publicKey.substr(71),
signature, data), |
| 120 "Invalid encrypted signature: Wrong padding in signature digest" |
| 121 ), "Wrong public key"); |
104 | 122 |
105 test.done(); | 123 test.done(); |
106 }; | 124 }; |
107 | 125 |
108 exports.testVeryLongData = function(test) | 126 exports.testVeryLongData = function(test) |
109 { | 127 { |
110 /* | 128 /* |
111 -----BEGIN RSA PRIVATE KEY----- | 129 -----BEGIN RSA PRIVATE KEY----- |
112 MIIBOQIBAAJBALZc50pEXnz9TSRozwM04rryuaXl/wgUFqV9FHq8HDlkdKvRU0hX | 130 MIIBOQIBAAJBALZc50pEXnz9TSRozwM04rryuaXl/wgUFqV9FHq8HDlkdKvRU0hX |
113 hb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQJBALRxYs5irhgAz2b6afOj | 131 hb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQJBALRxYs5irhgAz2b6afOj |
114 TcFr0PRtipckwW/IPw5euZKyvswEJt/tWDv4OdmDnRe8FSy6FG2Got3zxvaxYdc3 | 132 TcFr0PRtipckwW/IPw5euZKyvswEJt/tWDv4OdmDnRe8FSy6FG2Got3zxvaxYdc3 |
115 AXkCIQDfFGcytIVq3sbdF3lmhzcXf29R4Hrxg/eoByAKabxknwIhANFGSNMOGPt6 | 133 AXkCIQDfFGcytIVq3sbdF3lmhzcXf29R4Hrxg/eoByAKabxknwIhANFGSNMOGPt6 |
116 JRajfB9XmsltQJzbkr2sfHgjMN2FLM49AiAH6tt2yz1o+5snQawHXYkxBk7XIxZ5 | 134 JRajfB9XmsltQJzbkr2sfHgjMN2FLM49AiAH6tt2yz1o+5snQawHXYkxBk7XIxZ5 |
117 9+sURZx3giUzlQIfXF+pxX9zh41i0ZtYLn181WxkGNjS7OY2CtF9wEoIfQIgcHuf | 135 9+sURZx3giUzlQIfXF+pxX9zh41i0ZtYLn181WxkGNjS7OY2CtF9wEoIfQIgcHuf |
118 shh1qrvuKiXnD9b72PF676laKdzxzX5rX6cZZLA= | 136 shh1qrvuKiXnD9b72PF676laKdzxzX5rX6cZZLA= |
119 -----END RSA PRIVATE KEY----- | 137 -----END RSA PRIVATE KEY----- |
120 */ | 138 */ |
121 | 139 |
122 let data = "foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobar"; | 140 let data = "foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoob
arfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfo
obarfoobar"; |
123 let publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALZc50pEXnz9TSRozwM04rryuaXl/
wgUFqV9FHq8HDlkdKvRU0hXhb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQ=="; | 141 let publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALZc50pEXnz9TSRozwM04rryuaXl/
wgUFqV9FHq8HDlkdKvRU0hXhb/AKrSpCJ0NCxHtal1l/kHYlHG9e7Ev6+MCAwEAAQ=="; |
124 let signature = "L1LtPxp9VwL/ij8tuIxJqtx6mD3qoFhcEmPl8A1RlNeOP34A25nzyzRWuP2wE
bHcKKXnAQESdIXaTaEuymXviQ=="; | 142 let signature = "L1LtPxp9VwL/ij8tuIxJqtx6mD3qoFhcEmPl8A1RlNeOP34A25nzyzRWuP2wE
bHcKKXnAQESdIXaTaEuymXviQ=="; |
125 test.ok(verifySignature(publicKey, signature, data), "Correct signature"); | 143 test.ok(verifySignature(publicKey, signature, data), "Correct signature"); |
126 | 144 |
127 test.ok(!verifySignature(publicKey, signature, data + "1"), "Wrong data"); | 145 test.ok(!verifySignature(publicKey, signature, data + "1"), "Wrong data"); |
128 test.ok(!verifySignature(publicKey, signature, data.substr(0, 3)), "Wrong data
"); | 146 test.ok(!verifySignature(publicKey, signature, data.substr(0, 3)), "Wrong data
"); |
129 test.ok(!verifySignature(publicKey, signature.substr(0, 5) + "0" + signature.s
ubstr(6), data), "Wrong signature"); | 147 test.ok(!silenceWarnOutput( |
130 test.ok(!verifySignature(publicKey.substr(0, 5) + "R" + publicKey.substr(6), s
ignature, data), "Wrong public key"); | 148 () => verifySignature(publicKey, signature.substr(0, 5) + "0" + signature.su
bstr(6), data), |
131 test.ok(!verifySignature(publicKey.substr(0, 70) + "8" + publicKey.substr(71),
signature, data), "Wrong public key"); | 149 "Invalid encrypted signature: Wrong padding in signature digest" |
| 150 ), "Wrong signature"); |
| 151 test.ok(!silenceWarnOutput( |
| 152 () => verifySignature(publicKey.substr(0, 5) + "R" + publicKey.substr(6), si
gnature, data), |
| 153 "Invalid RSA public key: Unexpected type" |
| 154 ), "Wrong public key"); |
| 155 test.ok(!silenceWarnOutput( |
| 156 () => verifySignature(publicKey.substr(0, 70) + "8" + publicKey.substr(71),
signature, data), |
| 157 "Invalid encrypted signature: Wrong padding in signature digest" |
| 158 ), "Wrong public key"); |
132 | 159 |
133 test.done(); | 160 test.done(); |
134 }; | 161 }; |
135 | 162 |
136 exports.testRealLifeSignature = function(test) | 163 exports.testRealLifeSignature = function(test) |
137 { | 164 { |
138 let data = [ | 165 let data = [ |
139 "/info/Liquidit%C3%A4t.html?ses=Y3JlPTEzNTUyNDE2OTImdGNpZD13d3cuYWZmaWxpbmV0
LXZlcnplaWNobmlzLmRlNTBjNjAwNzIyNTlkNjQuNDA2MjE2MTImZmtpPTcyOTU2NiZ0YXNrPXNlYXJj
aCZkb21haW49YWZmaWxpbmV0LXZlcnplaWNobmlzLmRlJnM9ZGZmM2U5MTEzZGNhMWYyMWEwNDcmbGFu
Z3VhZ2U9ZGUmYV9pZD0yJmtleXdvcmQ9TGlxdWlkaXQlQzMlQTR0JnBvcz0yJmt3cz03Jmt3c2k9OA==
&token=AG06ipCV1LptGtY_9gFnr0vBTPy4O0YTvwoTCObJ3N3ckrQCFYIA3wod2TwAjxgAIABQv5WiA
lCH8qgOUJGr9g9QmuuEG1CDnK0pUPbRrk5QhqDgkQNxP4Qqhz9xZe4", | 166 "/info/Liquidit%C3%A4t.html?ses=Y3JlPTEzNTUyNDE2OTImdGNpZD13d3cuYWZmaWxpbmV0
LXZlcnplaWNobmlzLmRlNTBjNjAwNzIyNTlkNjQuNDA2MjE2MTImZmtpPTcyOTU2NiZ0YXNrPXNlYXJj
aCZkb21haW49YWZmaWxpbmV0LXZlcnplaWNobmlzLmRlJnM9ZGZmM2U5MTEzZGNhMWYyMWEwNDcmbGFu
Z3VhZ2U9ZGUmYV9pZD0yJmtleXdvcmQ9TGlxdWlkaXQlQzMlQTR0JnBvcz0yJmt3cz03Jmt3c2k9OA==
&token=AG06ipCV1LptGtY_9gFnr0vBTPy4O0YTvwoTCObJ3N3ckrQCFYIA3wod2TwAjxgAIABQv5WiA
lCH8qgOUJGr9g9QmuuEG1CDnK0pUPbRrk5QhqDgkQNxP4Qqhz9xZe4", |
140 "www.affilinet-verzeichnis.de", | 167 "www.affilinet-verzeichnis.de", |
141 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) Chro
me/25.0.1349.2 Safari/537.21" | 168 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) Chro
me/25.0.1349.2 Safari/537.21" |
142 ]; | 169 ]; |
143 let publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANnylWw2vLY4hUn9w06zQKbhKBfvj
FUCsdFlb6TdQhxb9RXWXuI4t31c+o8fYOv/s8q1LGPga3DE1L/tHU4LENMCAwEAAQ=="; | 170 let publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANnylWw2vLY4hUn9w06zQKbhKBfvj
FUCsdFlb6TdQhxb9RXWXuI4t31c+o8fYOv/s8q1LGPga3DE1L/tHU4LENMCAwEAAQ=="; |
144 let signature = "nLH8Vbc1rzmy0Q+Xg+bvm43IEO42h8rq5D9C0WCn/Y3ykgAoV4npzm7eMlqBS
wZBLA/0DuuVsfTJT9MOVaurcA=="; | 171 let signature = "nLH8Vbc1rzmy0Q+Xg+bvm43IEO42h8rq5D9C0WCn/Y3ykgAoV4npzm7eMlqBS
wZBLA/0DuuVsfTJT9MOVaurcA=="; |
145 test.ok(verifySignature(publicKey, signature, data.join("\0")), "Correct signa
ture"); | 172 test.ok(verifySignature(publicKey, signature, data.join("\0")), "Correct signa
ture"); |
146 | 173 |
147 test.done(); | 174 test.done(); |
148 }; | 175 }; |
OLD | NEW |