Compare commits
626 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f08736405e | ||
|
|
c05d011fba | ||
|
|
e94010b239 | ||
|
|
bb0d9ce226 | ||
|
|
09923991e5 | ||
|
|
3f0950ea01 | ||
|
|
e9f61c8787 | ||
|
|
9390431ce4 | ||
|
|
06c903b26c | ||
|
|
fa105b1d3a | ||
|
|
59f9c8e8c9 | ||
|
|
d547a44332 | ||
|
|
096a890097 | ||
|
|
fc27eb188f | ||
|
|
b4b536d782 | ||
|
|
a76899624a | ||
|
|
1a19fc17b2 | ||
|
|
013df1cc3b | ||
|
|
9cd1dfe898 | ||
|
|
cfbcb1de66 | ||
|
|
58d9badfe2 | ||
|
|
12a4af47c2 | ||
|
|
ee1f884229 | ||
|
|
c4286dc6ee | ||
|
|
b73ab2d885 | ||
|
|
056d2ad312 | ||
|
|
362efb24c1 | ||
|
|
7fbeca05c9 | ||
|
|
f8b5028cd1 | ||
|
|
ce8f78a7bb | ||
|
|
4973174534 | ||
|
|
44d16327c1 | ||
|
|
f03c31db82 | ||
|
|
20f3f4ac16 | ||
|
|
786bfc3bb7 | ||
|
|
3a3eabb57a | ||
|
|
ecd3e728b7 | ||
|
|
3e76df7481 | ||
|
|
4d410cfce9 | ||
|
|
8111e27905 | ||
|
|
d8dda9de84 | ||
|
|
8baf865c94 | ||
|
|
e913574e02 | ||
|
|
c9e70d4c0a | ||
|
|
d0d80170a2 | ||
|
|
d3800d59d5 | ||
|
|
c774b16976 | ||
|
|
77ba3ab99c | ||
|
|
ed2c01405f | ||
|
|
1179257bfd | ||
|
|
98705aa51c | ||
|
|
04e442070d | ||
|
|
2207f5e201 | ||
|
|
926e14b362 | ||
|
|
aa0c5e87e8 | ||
|
|
a6b2115963 | ||
|
|
eade213197 | ||
|
|
4acfe655d5 | ||
|
|
eeac8727bc | ||
|
|
64c7ee7e6b | ||
|
|
e89b9f6a2a | ||
|
|
19ea44208f | ||
|
|
c02ec54269 | ||
|
|
6f460bace6 | ||
|
|
40dc7e6e1d | ||
|
|
c60da7355e | ||
|
|
9399225b81 | ||
|
|
ce148944c7 | ||
|
|
76d660ebd3 | ||
|
|
ca93cc563e | ||
|
|
e051f1b510 | ||
|
|
a299e551fe | ||
|
|
18e39300e6 | ||
|
|
b734954a63 | ||
|
|
6854a2ade6 | ||
|
|
6de1326ba4 | ||
|
|
65ee333ae0 | ||
|
|
2661f2f7c4 | ||
|
|
3a8182c105 | ||
|
|
60152827e3 | ||
|
|
c6710c7a70 | ||
|
|
04bc3f0a63 | ||
|
|
a9d3af8821 | ||
|
|
352b4ea5b9 | ||
|
|
6f07e22210 | ||
|
|
09d1484b22 | ||
|
|
e3d884479a | ||
|
|
7a234cdae5 | ||
|
|
39105dac1b | ||
|
|
ca81b168d9 | ||
|
|
4e6303d397 | ||
|
|
482cb65690 | ||
|
|
e104c79374 | ||
|
|
7c05877df2 | ||
|
|
5fecb27c1e | ||
|
|
12a1256c1d | ||
|
|
a452d9ee2d | ||
|
|
af531f0449 | ||
|
|
0649b6af90 | ||
|
|
1d418728b0 | ||
|
|
bd39b48f19 | ||
|
|
5e1e458ecb | ||
|
|
db69432dcd | ||
|
|
7709ee622c | ||
|
|
a757ed886a | ||
|
|
6740ad3706 | ||
|
|
7609e35f10 | ||
|
|
3d962315f2 | ||
|
|
db3b14c960 | ||
|
|
20d28e6031 | ||
|
|
77172463a3 | ||
|
|
2bfda1be11 | ||
|
|
e426776598 | ||
|
|
ca253d5911 | ||
|
|
00af90ab3c | ||
|
|
a9ea3cd76d | ||
|
|
d21876cdb8 | ||
|
|
54c465f25d | ||
|
|
e295947d04 | ||
|
|
32a1753e61 | ||
|
|
1fcf6f038e | ||
|
|
ec39b59a03 | ||
|
|
95f748c54e | ||
|
|
08cf0629f5 | ||
|
|
11adda400f | ||
|
|
1c528eeee9 | ||
|
|
e4c3232f42 | ||
|
|
7ee8e5bf86 | ||
|
|
cbb2b59a90 | ||
|
|
69a27a4ec6 | ||
|
|
69ae372b51 | ||
|
|
813a3b438f | ||
|
|
fbe6d5defa | ||
|
|
98199faa0b | ||
|
|
010ca705df | ||
|
|
6c5064b5c3 | ||
|
|
97c9d444ae | ||
|
|
31f2931281 | ||
|
|
6b783965c4 | ||
|
|
b201c1f600 | ||
|
|
769e457d94 | ||
|
|
b3ff4878f8 | ||
|
|
0c97aa9e14 | ||
|
|
270e944e30 | ||
|
|
112262cb24 | ||
|
|
6d62d2fb56 | ||
|
|
fdd7d04744 | ||
|
|
edd309e537 | ||
|
|
40c2614ef4 | ||
|
|
ed0c143242 | ||
|
|
1512d5ce64 | ||
|
|
f23f9a03c8 | ||
|
|
f441949515 | ||
|
|
00bcfe0b7e | ||
|
|
223b6f1ba4 | ||
|
|
c22feee634 | ||
|
|
bcb971f930 | ||
|
|
f53faffb91 | ||
|
|
545a679aed | ||
|
|
95f5b36772 | ||
|
|
efe06e1efd | ||
|
|
73eb306cfd | ||
|
|
9398bf946c | ||
|
|
5d1d69453a | ||
|
|
4b2e21e7ee | ||
|
|
2a2487514a | ||
|
|
a630da6400 | ||
|
|
a6a5bb7c20 | ||
|
|
04a667b076 | ||
|
|
832fb114a7 | ||
|
|
d9068ad5a1 | ||
|
|
e8adcf88cd | ||
|
|
91b8932eb1 | ||
|
|
59d18adc4c | ||
|
|
b17be7e14b | ||
|
|
c0430f42b8 | ||
|
|
6244e44999 | ||
|
|
752e598a16 | ||
|
|
e6ad2c8792 | ||
|
|
ec86134a0d | ||
|
|
2fb1124b0f | ||
|
|
4408034bcd | ||
|
|
2f62b1299f | ||
|
|
62b427ec55 | ||
|
|
894031bbd9 | ||
|
|
5c4aeb779f | ||
|
|
5f56b28629 | ||
|
|
d299c28ecc | ||
|
|
3451c5a9b3 | ||
|
|
e5577d5541 | ||
|
|
b99c23af40 | ||
|
|
519365cfa5 | ||
|
|
8737e1ee20 | ||
|
|
fbfbf94deb | ||
|
|
d67cfd146a | ||
|
|
bd3bd83dda | ||
|
|
3b7925eb7d | ||
|
|
76160f784a | ||
|
|
2296647e01 | ||
|
|
249aff45c2 | ||
|
|
06d9156b8d | ||
|
|
ddbc4647fa | ||
|
|
dec289e821 | ||
|
|
26e0de41c3 | ||
|
|
2d9b9fecd5 | ||
|
|
be2fa90b94 | ||
|
|
84c3fb07b0 | ||
|
|
a925c32cca | ||
|
|
1a5364bd19 | ||
|
|
64ad448adc | ||
|
|
ca5884873e | ||
|
|
344888addd | ||
|
|
8857aeb223 | ||
|
|
5ec05f0a28 | ||
|
|
72e962cf55 | ||
|
|
6a76c60e6c | ||
|
|
e93e5349cb | ||
|
|
657cfe721b | ||
|
|
f285d4f4f3 | ||
|
|
bf3a0902ef | ||
|
|
9a189be740 | ||
|
|
9ff411f7f7 | ||
|
|
a381eb8ddb | ||
|
|
17616eac17 | ||
|
|
a584320357 | ||
|
|
5aef2c0d55 | ||
|
|
973800b52f | ||
|
|
d7f0287235 | ||
|
|
b37f09aa2e | ||
|
|
66fb32d267 | ||
|
|
485dda9774 | ||
|
|
d89d456655 | ||
|
|
c59b6f704c | ||
|
|
79706a8e48 | ||
|
|
2e8b33824f | ||
|
|
aca3f961db | ||
|
|
335e878be8 | ||
|
|
d12ea887bc | ||
|
|
d98beea894 | ||
|
|
198fd7b0bd | ||
|
|
0a4cb86976 | ||
|
|
57b7fe4e6f | ||
|
|
6f074b71bb | ||
|
|
f5f1878ba1 | ||
|
|
b26141e2c5 | ||
|
|
a2b6c1930d | ||
|
|
8bb5edc1c9 | ||
|
|
454bc86479 | ||
|
|
3a47bf7265 | ||
|
|
8203ec4b11 | ||
|
|
0b8e4738f9 | ||
|
|
d38e683a6f | ||
|
|
c3f140033c | ||
|
|
1c09a4adb2 | ||
|
|
a07dca7cd2 | ||
|
|
b7ebc662eb | ||
|
|
f30dabb2ac | ||
|
|
e2e5f5cd9d | ||
|
|
27b7f3b43a | ||
|
|
4b88647966 | ||
|
|
d43fd8a038 | ||
|
|
2abd56f428 | ||
|
|
1bf9b3b06f | ||
|
|
dfd059173d | ||
|
|
b931ed8563 | ||
|
|
88abf70386 | ||
|
|
5de8b54c51 | ||
|
|
f4f2987273 | ||
|
|
8f58d0dbc8 | ||
|
|
12e091842f | ||
|
|
81d3b1c825 | ||
|
|
32fb5dfef7 | ||
|
|
ca221e6c21 | ||
|
|
fe460d47b0 | ||
|
|
448b4516ff | ||
|
|
f684aec4f3 | ||
|
|
cbc920d474 | ||
|
|
b104df742d | ||
|
|
8e5aaada2e | ||
|
|
c1f74f152b | ||
|
|
279ab5e62f | ||
|
|
e1205e4d15 | ||
|
|
ea7cd31751 | ||
|
|
a79409afa9 | ||
|
|
dda48ccd0f | ||
|
|
f36b494aeb | ||
|
|
395c1f44bd | ||
|
|
411493b1f7 | ||
|
|
a14bf1946d | ||
|
|
8a9cad44a5 | ||
|
|
6665aca024 | ||
|
|
c993ac6932 | ||
|
|
a357424a25 | ||
|
|
5078a54b52 | ||
|
|
84711b18bc | ||
|
|
84778a5b46 | ||
|
|
3415b15a56 | ||
|
|
8314b7f5e6 | ||
|
|
32e94947dc | ||
|
|
b0ad55a08a | ||
|
|
87504abb07 | ||
|
|
789259d2e7 | ||
|
|
83b9f42796 | ||
|
|
ccd7fe8de5 | ||
|
|
2175c9dae1 | ||
|
|
10e135af70 | ||
|
|
4d9b223ac2 | ||
|
|
6696beed45 | ||
|
|
d787e00a3b | ||
|
|
e6e87891a9 | ||
|
|
930a07c3f5 | ||
|
|
0d0bd331ae | ||
|
|
5a3e82f9f5 | ||
|
|
9cbae55a6e | ||
|
|
cf7c1874fe | ||
|
|
47908a8907 | ||
|
|
8fd402bfcf | ||
|
|
d2e2cb0d27 | ||
|
|
98ba262a48 | ||
|
|
768b41017c | ||
|
|
bd7d9140f9 | ||
|
|
b1ca5eb58a | ||
|
|
f0b7952caa | ||
|
|
b1a657a00d | ||
|
|
d9711a5798 | ||
|
|
10abe4f26e | ||
|
|
84e7ad922b | ||
|
|
4698dd9a02 | ||
|
|
c90ea2bd6d | ||
|
|
fdec7fe203 | ||
|
|
18cb92ab18 | ||
|
|
86c0af514b | ||
|
|
2aadc8bb5b | ||
|
|
ae42d69d72 | ||
|
|
5284e1b60e | ||
|
|
05563e9ef2 | ||
|
|
458cf9070b | ||
|
|
245e1b4fdb | ||
|
|
87c1947d49 | ||
|
|
8b8d59eefb | ||
|
|
dbe79d3451 | ||
|
|
10152506fe | ||
|
|
aaac71d38f | ||
|
|
415535e47b | ||
|
|
3475caf8f5 | ||
|
|
f1307515b7 | ||
|
|
ab931be45b | ||
|
|
d9574c2f14 | ||
|
|
1d23c74361 | ||
|
|
0654e1c4ef | ||
|
|
ed4e8830d7 | ||
|
|
c9f70b381d | ||
|
|
b4671902f2 | ||
|
|
76e97c4002 | ||
|
|
1aefe491fb | ||
|
|
04a9217dcf | ||
|
|
fa446a563e | ||
|
|
2eb09b66ef | ||
|
|
80be6e69a9 | ||
|
|
009d5fb41f | ||
|
|
f86655fddd | ||
|
|
0ded557af6 | ||
|
|
72b9861635 | ||
|
|
5f88e8887a | ||
|
|
ddb68acebe | ||
|
|
2d96276e24 | ||
|
|
86c2bdfd5d | ||
|
|
cba3a1741a | ||
|
|
5568d82c26 | ||
|
|
1c0bf23ba2 | ||
|
|
8250760617 | ||
|
|
59948a6e1c | ||
|
|
55c43da5d8 | ||
|
|
809ee79592 | ||
|
|
629e37dde1 | ||
|
|
bc530fe89f | ||
|
|
fc73ad644f | ||
|
|
9c17a685bd | ||
|
|
986b5e257e | ||
|
|
97ee01ad89 | ||
|
|
d12e53ea09 | ||
|
|
8220180133 | ||
|
|
a206a23980 | ||
|
|
0a87c91692 | ||
|
|
865c3a2383 | ||
|
|
f03304a9c7 | ||
|
|
bdde31d787 | ||
|
|
0575c0a667 | ||
|
|
bfd471f53e | ||
|
|
6f8ba620c2 | ||
|
|
84d7c981dc | ||
|
|
24324d83e8 | ||
|
|
b7ccd48dd8 | ||
|
|
94073ecf7b | ||
|
|
776d0f3459 | ||
|
|
262430f705 | ||
|
|
e4ff4e6898 | ||
|
|
593f74b9cb | ||
|
|
298a771494 | ||
|
|
2d8b65e837 | ||
|
|
51d9b435cd | ||
|
|
f35e21e2e4 | ||
|
|
683bcb9154 | ||
|
|
11c570cfb4 | ||
|
|
c4679ad0f1 | ||
|
|
2f7a9997c8 | ||
|
|
8595d31ee8 | ||
|
|
026c5f7617 | ||
|
|
222e3de4be | ||
|
|
910bd45756 | ||
|
|
a0cd439788 | ||
|
|
838e8c9166 | ||
|
|
695aa2d5a2 | ||
|
|
e2a186af10 | ||
|
|
5d4b0c9026 | ||
|
|
461764cbbe | ||
|
|
de374ba6b1 | ||
|
|
3b8848fa4e | ||
|
|
3cac997e19 | ||
|
|
be7eecafd2 | ||
|
|
c891967b6f | ||
|
|
2ea321d85a | ||
|
|
c285051c08 | ||
|
|
2ce73dbe85 | ||
|
|
07c46dac87 | ||
|
|
d9c6b09ac4 | ||
|
|
2ea5fa0710 | ||
|
|
bcd88403e2 | ||
|
|
d1e4a866ad | ||
|
|
5cbf75324d | ||
|
|
2bda554be4 | ||
|
|
2fad3d34b7 | ||
|
|
cc8005b4e7 | ||
|
|
77cd030ac3 | ||
|
|
ed54768f5f | ||
|
|
83082f04a4 | ||
|
|
687c5ef794 | ||
|
|
103849419a | ||
|
|
7d5d89856d | ||
|
|
0a27bd065e | ||
|
|
1b5e57e935 | ||
|
|
b22c884231 | ||
|
|
a2ae4a8a0f | ||
|
|
dc8adc3b48 | ||
|
|
5ccee900a0 | ||
|
|
178152f604 | ||
|
|
369010406e | ||
|
|
a790fa46f4 | ||
|
|
6ce5af574f | ||
|
|
81b2d877fb | ||
|
|
3764c12b1f | ||
|
|
9b8eb4d690 | ||
|
|
8d13ca1f11 | ||
|
|
645cc8cf49 | ||
|
|
1c21b7943d | ||
|
|
172f006020 | ||
|
|
6aeb45187b | ||
|
|
a43a7dfa58 | ||
|
|
efae3da41d | ||
|
|
fe37c35018 | ||
|
|
4b36f34d6d | ||
|
|
3df62878c3 | ||
|
|
71cc095cb2 | ||
|
|
43e4a2a289 | ||
|
|
fdbf76d4f4 | ||
|
|
c8ad9b8375 | ||
|
|
41016bfc46 | ||
|
|
c39b06866e | ||
|
|
2323664a37 | ||
|
|
4968232490 | ||
|
|
00728c24e7 | ||
|
|
90e165aa0c | ||
|
|
7629d36a53 | ||
|
|
8555125a1a | ||
|
|
3f64753779 | ||
|
|
14002c8eba | ||
|
|
a2120986ff | ||
|
|
f1e1fb4bde | ||
|
|
8c9479c6bb | ||
|
|
6690680538 | ||
|
|
d743f03552 | ||
|
|
2742fdfda2 | ||
|
|
0a61b0df12 | ||
|
|
343328c6b8 | ||
|
|
d3631907d6 | ||
|
|
87cfcfd374 | ||
|
|
522dfe3422 | ||
|
|
c545563d46 | ||
|
|
7a37c906a1 | ||
|
|
5b721607b1 | ||
|
|
2ef9cfa5b8 | ||
|
|
7d7797b141 | ||
|
|
401926283a | ||
|
|
2201a0808e | ||
|
|
05454818dc | ||
|
|
43deefa435 | ||
|
|
21ca2d833b | ||
|
|
bb3fd02930 | ||
|
|
c923cdbd5b | ||
|
|
019b456605 | ||
|
|
7d489192fd | ||
|
|
44a0de1861 | ||
|
|
a01d5876fa | ||
|
|
15399da9fe | ||
|
|
6da916d4ac | ||
|
|
e540144b2e | ||
|
|
76793dc969 | ||
|
|
6ac7f9f144 | ||
|
|
2d12315c94 | ||
|
|
7f71fd13ae | ||
|
|
819adfff6f | ||
|
|
f5d2bc8a36 | ||
|
|
9db7bf5f52 | ||
|
|
410b618d18 | ||
|
|
c2fa70ddfd | ||
|
|
8a38d5663a | ||
|
|
dd9e71843b | ||
|
|
b34e8c3c36 | ||
|
|
73aa262647 | ||
|
|
e1cb7ce017 | ||
|
|
a75560d828 | ||
|
|
ec82517c89 | ||
|
|
31ffe954b6 | ||
|
|
872d60f6e4 | ||
|
|
2689f4d02b | ||
|
|
3dd20ff2f8 | ||
|
|
9f35575ca3 | ||
|
|
b6dc3b517b | ||
|
|
f0c11b1917 | ||
|
|
40cd036941 | ||
|
|
fe98cf8dc5 | ||
|
|
e96cd730d1 | ||
|
|
4110f33cde | ||
|
|
8e79c64750 | ||
|
|
05708fc63e | ||
|
|
9d2174b6f5 | ||
|
|
8bd66202c3 | ||
|
|
f32339e700 | ||
|
|
c8063ff034 | ||
|
|
cefe611ce5 | ||
|
|
a280b4e661 | ||
|
|
603c7ccea8 | ||
|
|
64f9370691 | ||
|
|
e2bf701454 | ||
|
|
c929529f9f | ||
|
|
6cc56d8e83 | ||
|
|
2adc9062d8 | ||
|
|
6970bd96d1 | ||
|
|
d63b0adabd | ||
|
|
bed3ad104e | ||
|
|
dbe23aadae | ||
|
|
a66d097cbe | ||
|
|
3ca507a6eb | ||
|
|
c58e10565e | ||
|
|
904ff7d07b | ||
|
|
d0ac235c8f | ||
|
|
78c7bb8e26 | ||
|
|
3b318ed095 | ||
|
|
d9dac6772f | ||
|
|
5fe8bc0b4d | ||
|
|
7a47324c78 | ||
|
|
9c1e9f0b6a | ||
|
|
240f3fbe2f | ||
|
|
288424ad63 | ||
|
|
91e615bfec | ||
|
|
9a33582204 | ||
|
|
8a46ed83cc | ||
|
|
5eede9d4d9 | ||
|
|
30158c77e9 | ||
|
|
ee618d7540 | ||
|
|
6ff4388ffa | ||
|
|
794298063d | ||
|
|
bcd2714038 | ||
|
|
f3cd4206b8 | ||
|
|
cc4b78d59f | ||
|
|
297a50a063 | ||
|
|
7271c7ff35 | ||
|
|
19765903dc | ||
|
|
22f721dbf2 | ||
|
|
73278c0a16 | ||
|
|
40d324f102 | ||
|
|
1c5d5e58c6 | ||
|
|
a43c00c569 | ||
|
|
2939cab06d | ||
|
|
9e56521b4b | ||
|
|
80264be428 | ||
|
|
95d839f15c | ||
|
|
9228c53cf5 | ||
|
|
2da02dd774 | ||
|
|
2ed2b9a3e4 | ||
|
|
bd336ba272 | ||
|
|
25b12b8839 | ||
|
|
433fb54b25 | ||
|
|
0bbbee96b7 | ||
|
|
ba0909e96a | ||
|
|
658b5b414a | ||
|
|
70918a6645 | ||
|
|
e4db374421 | ||
|
|
01fe1d2137 | ||
|
|
31e6ea7f5d | ||
|
|
e9c2b5c84d | ||
|
|
158ea66c6c | ||
|
|
1a01afab23 | ||
|
|
85c33b9602 | ||
|
|
93cfb02acb | ||
|
|
fba4088941 | ||
|
|
f7d3cc0e58 | ||
|
|
e66ec79b18 | ||
|
|
99142385da | ||
|
|
e874738d3d | ||
|
|
8938414f0c | ||
|
|
ae3ae3df76 | ||
|
|
7be46ce487 | ||
|
|
fc0e97a70e | ||
|
|
cc0b4c3b62 | ||
|
|
6ccefea62a | ||
|
|
44e1254d1c | ||
|
|
5210998688 | ||
|
|
c199b8499d | ||
|
|
f13dff6977 | ||
|
|
f01a4ca4e2 | ||
|
|
75aa0fbf70 | ||
|
|
d1b70ffa03 | ||
|
|
e00d4805d7 | ||
|
|
edffb50b98 | ||
|
|
4405b78d60 |
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
src/*.exe
|
||||
src/bitcoin
|
||||
src/bitcoind
|
||||
.*.swp
|
||||
*.*~*
|
||||
@@ -1,19 +1,19 @@
|
||||
Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Copyright (c) 2009-2011 Bitcoin Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
16
README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Bitcoin integration/staging tree
|
||||
|
||||
Development process
|
||||
===================
|
||||
|
||||
Developers work in their own trees, then submit pull requests when they think their feature or bug fix is ready.
|
||||
|
||||
If it is a simple/trivial/non-controversial change, then one of the bitcoin development team members simply pulls it.
|
||||
|
||||
If it is a more complicated or potentially controversial change, then the patch submitter will be asked to start a discussion (if they haven't already) on the development forums: http://www.bitcoin.org/smf/index.php?board=6.0
|
||||
The patch will be accepted if there is broad consensus that it is a good thing. Developers should expect to rework and resubmit patches if they don't match the project's coding conventions (see coding.txt) or are controversial.
|
||||
|
||||
The master branch is regularly built and tested (by who? need people willing to be quality assurance testers), and periodically pushed to the subversion repo to become the official, stable, released bitcoin.
|
||||
|
||||
|
||||
Feature branches are created when there are major new features being worked on by several people.
|
||||
114
build-msw.txt
@@ -1,114 +0,0 @@
|
||||
Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
WINDOWS BUILD NOTES
|
||||
===================
|
||||
|
||||
Compilers Supported
|
||||
-------------------
|
||||
MinGW GCC (recommended)
|
||||
|
||||
MSVC 6.0 SP6: You'll need Boost version 1.34 because they dropped support
|
||||
for MSVC 6.0 after that. However, they didn't add Asio until 1.35.
|
||||
You should still be able to build with MSVC 6.0 by adding Asio to 1.34 by
|
||||
unpacking boost_asio_*.zip into the boost directory:
|
||||
http://sourceforge.net/projects/asio/files/asio
|
||||
|
||||
MSVC 8.0 (2005) SP1 has been tested. Note: MSVC 7.0 and up have a habit of
|
||||
linking to runtime DLLs that are not installed on XP by default.
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
Libraries you need to download separately and build:
|
||||
|
||||
default path download
|
||||
wxWidgets-2.9 \wxwidgets http://www.wxwidgets.org/downloads/
|
||||
OpenSSL \openssl http://www.openssl.org/source/
|
||||
Berkeley DB \db http://www.oracle.com/technology/software/products/berkeley-db/index.html
|
||||
Boost \boost http://www.boost.org/users/download/
|
||||
|
||||
Their licenses:
|
||||
wxWidgets LGPL 2.1 with very liberal exceptions
|
||||
OpenSSL Old BSD license with the problematic advertising requirement
|
||||
Berkeley DB New BSD license with additional requirement that linked software must be free open source
|
||||
Boost MIT-like license
|
||||
|
||||
Versions used in this release:
|
||||
MinGW GCC 3.4.5
|
||||
wxWidgets 2.9.0
|
||||
OpenSSL 0.9.8k
|
||||
Berkeley DB 4.7.25.NC
|
||||
Boost 1.42.1
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
The UI layout is edited with wxFormBuilder. The project file is
|
||||
uiproject.fbp. It generates uibase.cpp and uibase.h, which define base
|
||||
classes that do the rote work of constructing all the UI elements.
|
||||
|
||||
The release is built with GCC and then "strip bitcoin.exe" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
cd \wxwidgets\build\msw
|
||||
make -f makefile.gcc
|
||||
or
|
||||
nmake -f makefile.vc
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
Bitcoin does not use any encryption. If you want to do a no-everything
|
||||
build of OpenSSL to exclude encryption routines, a few patches are required.
|
||||
(instructions for OpenSSL v0.9.8k)
|
||||
|
||||
Edit engines\e_gmp.c and engines\e_capi.c and add this #ifndef around
|
||||
the openssl/rsa.h include:
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#include <openssl/rsa.h>
|
||||
#endif
|
||||
|
||||
Edit ms\mingw32.bat and replace the Configure line's parameters with this
|
||||
no-everything list. You have to put this in the batch file because batch
|
||||
files can't take more than nine command line parameters.
|
||||
perl Configure mingw threads no-rc2 no-rc4 no-rc5 no-idea no-des no-bf no-cast no-aes no-camellia no-seed no-rsa no-dh
|
||||
|
||||
Also REM out the following line in ms\mingw32.bat after the mingw32-make
|
||||
line. The build fails after it's already finished building libeay32, which
|
||||
is all we care about, but the failure aborts the script before it runs
|
||||
dllwrap to generate libeay32.dll.
|
||||
REM if errorlevel 1 goto end
|
||||
|
||||
Build
|
||||
cd \openssl
|
||||
ms\mingw32.bat
|
||||
|
||||
If you want to use it with MSVC, generate the .lib file
|
||||
lib /machine:i386 /def:ms\libeay32.def /out:out\libeay32.lib
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
Using MinGW and MSYS:
|
||||
cd \db\build_unix
|
||||
sh ../dist/configure --enable-mingw --enable-cxx
|
||||
make
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
download bjam.exe from
|
||||
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
|
||||
cd \boost
|
||||
bjam toolset=gcc --build-type=complete stage
|
||||
or
|
||||
bjam toolset=msvc --build-type=complete stage
|
||||
32
contrib/Bitcoin.app/Contents/Info.plist
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Bitcoin</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>bitcoin</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.bitcoin.bitcoin</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Bitcoin</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.3.24</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>324</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.5</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>BitcoinAppIcon.icns</string>
|
||||
<key>LSMultipleInstancesProhibited</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
0
contrib/Bitcoin.app/Contents/MacOS/.higit
Normal file
BIN
contrib/Bitcoin.app/Contents/Resources/BitcoinAppIcon.icns
Normal file
84
contrib/gitian-win32.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
packages:
|
||||
- "mingw32"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
- "nsis"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
||||
"dir": "bitcoin"
|
||||
files:
|
||||
- "wxWidgets-2.9.1.tar.bz2"
|
||||
- "boost_1_43_0.tar.bz2"
|
||||
- "openssl-1.0.0d.tar.gz"
|
||||
- "db-4.7.25.NC.tar.gz"
|
||||
- "upnpc-exe-win32-20110215.zip"
|
||||
- "miniupnpc-1.5.20110215.tar.gz"
|
||||
- "WSPiApi.h"
|
||||
script: |
|
||||
#
|
||||
tar xjf wxWidgets-2.9.1.tar.bz2
|
||||
cd wxWidgets-2.9.1
|
||||
./configure --host=i586-mingw32msvc --build=i686-linux --disable-shared --enable-monolithic --without-libpng --disable-svg
|
||||
perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
|
||||
make $MAKEOPTS
|
||||
cd ..
|
||||
#
|
||||
tar xzf openssl-1.0.0d.tar.gz
|
||||
cd openssl-1.0.0d
|
||||
./Configure --cross-compile-prefix=i586-mingw32msvc- mingw
|
||||
make
|
||||
cd ..
|
||||
#
|
||||
tar xzf db-4.7.25.NC.tar.gz
|
||||
cd db-4.7.25.NC/build_unix
|
||||
../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include"
|
||||
make $MAKEOPTS
|
||||
cd ../..
|
||||
#
|
||||
tar xjf boost_1_43_0.tar.bz2
|
||||
cd boost_1_43_0
|
||||
echo "using gcc : 4.4 : i586-mingw32msvc-g++
|
||||
:
|
||||
<rc>i586-mingw32msvc-windres
|
||||
<archiver>i586-mingw32msvc-ar
|
||||
;" > user-config.jam
|
||||
./bootstrap.sh --without-icu
|
||||
./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage
|
||||
cd ..
|
||||
#
|
||||
mkdir upnpc-exe-win32-20110215
|
||||
cd upnpc-exe-win32-20110215
|
||||
unzip ../upnpc-exe-win32-20110215.zip
|
||||
mkdir miniupnpc
|
||||
cd miniupnpc
|
||||
tar xzf ../../miniupnpc-1.5.20110215.tar.gz
|
||||
mv ./miniupnpc-1.5.20110215/* ./
|
||||
cd ../..
|
||||
#
|
||||
cp WSPiApi.h $HOME/build
|
||||
#
|
||||
cd bitcoin
|
||||
mkdir -p $OUTDIR/src
|
||||
cp -a . $OUTDIR/src
|
||||
rm -rf $OUTDIR/src/.git
|
||||
cp -a $OUTDIR/src/locale $OUTDIR
|
||||
cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt
|
||||
cp $OUTDIR/src/COPYING $OUTDIR/license.txt
|
||||
cd src
|
||||
sed 's/$(DEBUGFLAGS)//' < makefile.linux-mingw > makefile.linux-mingw.2 && mv makefile.linux-mingw.2 makefile.linux-mingw
|
||||
sed 's|//#include <WSPiApi.h>|#include <WSPiApi.h>|' < net.cpp > net.cpp.2 && mv net.cpp.2 net.cpp
|
||||
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1
|
||||
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0
|
||||
i586-mingw32msvc-strip bitcoin.exe
|
||||
i586-mingw32msvc-strip bitcoind.exe
|
||||
makensis ../share/setup.nsi
|
||||
cp bitcoin.exe ../share/bitcoin-*-win32-setup.exe $OUTDIR/
|
||||
mkdir $OUTDIR/daemon
|
||||
cp bitcoind.exe $OUTDIR/daemon
|
||||
57
contrib/gitian.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
- "amd64"
|
||||
packages:
|
||||
- "libdb4.7++-dev"
|
||||
- "libxxf86vm-dev"
|
||||
- "libgtk2.0-dev"
|
||||
- "libboost-all-dev"
|
||||
- "libssl-dev"
|
||||
- "git-core"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
||||
"dir": "bitcoin"
|
||||
files:
|
||||
- "wxWidgets-2.9.1.tar.bz2"
|
||||
- "miniupnpc-1.5.tar.gz"
|
||||
- "toplevel.h.diff"
|
||||
- "toplevel.cpp.diff"
|
||||
script: |
|
||||
INSTDIR="$HOME/install"
|
||||
export LIBRARY_PATH="$INSTDIR/lib"
|
||||
#
|
||||
tar xzf miniupnpc-1.5.tar.gz
|
||||
cd miniupnpc-1.5
|
||||
INSTALLPREFIX=$INSTDIR make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
tar xjf wxWidgets-2.9.1.tar.bz2
|
||||
cd wxWidgets-2.9.1
|
||||
cd include/wx/gtk
|
||||
patch < ../../../../toplevel.h.diff
|
||||
cd ../../../src/gtk
|
||||
patch < ../../../toplevel.cpp.diff
|
||||
cd ../..
|
||||
./configure --prefix=$INSTDIR --enable-monolithic --disable-shared
|
||||
perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
|
||||
make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
cd bitcoin
|
||||
mkdir -p $OUTDIR/src
|
||||
cp -a . $OUTDIR/src
|
||||
rm -rf $OUTDIR/src/.git
|
||||
mv $OUTDIR/src/locale $OUTDIR
|
||||
cp $OUTDIR/src/doc/README $OUTDIR
|
||||
cp $OUTDIR/src/COPYING $OUTDIR
|
||||
cd src
|
||||
sed 's/$(DEBUGFLAGS)//' < makefile.unix > makefile.unix.2 && mv makefile.unix.2 makefile.unix
|
||||
PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin USE_UPNP=1
|
||||
PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0
|
||||
mkdir -p $OUTDIR/bin/$GBUILD_BITS
|
||||
install -s bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS
|
||||
4
contrib/wx-patches/README
Normal file
@@ -0,0 +1,4 @@
|
||||
This folder contains two patches which are applied to wxWidgets
|
||||
2.9.1 before building the wxWidgets which is used for release
|
||||
versions of bitcoin. They make the GUI show up on newer OSs
|
||||
with new libgtks, such as Ubuntu 11.04.
|
||||
86
contrib/wx-patches/toplevel.cpp.diff
Normal file
@@ -0,0 +1,86 @@
|
||||
--- /wxWidgets/trunk/src/gtk/toplevel.cpp (revision 67326)
|
||||
+++ /wxWidgets/trunk/src/gtk/toplevel.cpp (revision 67496)
|
||||
@@ -72,4 +72,8 @@
|
||||
// send any activate events at all
|
||||
static int g_sendActivateEvent = -1;
|
||||
+
|
||||
+// Whether _NET_REQUEST_FRAME_EXTENTS support is working
|
||||
+// 0 == not tested yet, 1 == working, 2 == broken
|
||||
+static int gs_requestFrameExtentsStatus;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -432,4 +436,12 @@
|
||||
if (event->state == GDK_PROPERTY_NEW_VALUE && event->atom == property)
|
||||
{
|
||||
+ if (win->m_netFrameExtentsTimerId)
|
||||
+ {
|
||||
+ // WM support for _NET_REQUEST_FRAME_EXTENTS is working
|
||||
+ gs_requestFrameExtentsStatus = 1;
|
||||
+ g_source_remove(win->m_netFrameExtentsTimerId);
|
||||
+ win->m_netFrameExtentsTimerId = 0;
|
||||
+ }
|
||||
+
|
||||
wxSize decorSize = win->m_decorSize;
|
||||
int left, right, top, bottom;
|
||||
@@ -439,4 +451,22 @@
|
||||
win->GTKUpdateDecorSize(decorSize);
|
||||
}
|
||||
+ return false;
|
||||
+}
|
||||
+}
|
||||
+
|
||||
+extern "C" {
|
||||
+static gboolean request_frame_extents_timeout(void* data)
|
||||
+{
|
||||
+ // WM support for _NET_REQUEST_FRAME_EXTENTS is broken
|
||||
+ gs_requestFrameExtentsStatus = 2;
|
||||
+ gdk_threads_enter();
|
||||
+ wxTopLevelWindowGTK* win = static_cast<wxTopLevelWindowGTK*>(data);
|
||||
+ win->m_netFrameExtentsTimerId = 0;
|
||||
+ wxSize decorSize = win->m_decorSize;
|
||||
+ int left, right, top, bottom;
|
||||
+ if (wxGetFrameExtents(gtk_widget_get_window(win->m_widget), &left, &right, &top, &bottom))
|
||||
+ decorSize.Set(left + right, top + bottom);
|
||||
+ win->GTKUpdateDecorSize(decorSize);
|
||||
+ gdk_threads_leave();
|
||||
return false;
|
||||
}
|
||||
@@ -459,4 +489,5 @@
|
||||
m_deferShowAllowed = true;
|
||||
m_updateDecorSize = true;
|
||||
+ m_netFrameExtentsTimerId = 0;
|
||||
|
||||
m_urgency_hint = -2;
|
||||
@@ -811,5 +842,6 @@
|
||||
if (deferShow)
|
||||
{
|
||||
- deferShow = m_deferShowAllowed && !GTK_WIDGET_REALIZED(m_widget);
|
||||
+ deferShow = gs_requestFrameExtentsStatus != 2 &&
|
||||
+ m_deferShowAllowed && !gtk_widget_get_realized(m_widget);
|
||||
if (deferShow)
|
||||
{
|
||||
@@ -829,11 +861,4 @@
|
||||
// GetSize()/SetSize() because it makes window bigger between each
|
||||
// restore and save.
|
||||
- m_updateDecorSize = deferShow;
|
||||
- }
|
||||
- if (deferShow)
|
||||
- {
|
||||
- // Fluxbox support for _NET_REQUEST_FRAME_EXTENTS is broken
|
||||
- const char* name = gdk_x11_screen_get_window_manager_name(screen);
|
||||
- deferShow = strcmp(name, "Fluxbox") != 0;
|
||||
m_updateDecorSize = deferShow;
|
||||
}
|
||||
@@ -875,4 +900,12 @@
|
||||
(XEvent*)&xevent);
|
||||
|
||||
+ if (gs_requestFrameExtentsStatus == 0)
|
||||
+ {
|
||||
+ // if WM does not respond to request within 1 second,
|
||||
+ // we assume support for _NET_REQUEST_FRAME_EXTENTS is not working
|
||||
+ m_netFrameExtentsTimerId =
|
||||
+ g_timeout_add(1000, request_frame_extents_timeout, this);
|
||||
+ }
|
||||
+
|
||||
// defer calling gtk_widget_show()
|
||||
m_isShown = true;
|
||||
9
contrib/wx-patches/toplevel.h.diff
Normal file
@@ -0,0 +1,9 @@
|
||||
--- /wxWidgets/trunk/include/wx/gtk/toplevel.h (revision 65373)
|
||||
+++ /wxWidgets/trunk/include/wx/gtk/toplevel.h (revision 67496)
|
||||
@@ -114,4 +114,6 @@
|
||||
// wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
|
||||
int m_urgency_hint;
|
||||
+ // timer for detecting WM with broken _NET_REQUEST_FRAME_EXTENTS handling
|
||||
+ unsigned m_netFrameExtentsTimerId;
|
||||
|
||||
// return the size of the window without WM decorations
|
||||
30
doc/README
Normal file
@@ -0,0 +1,30 @@
|
||||
Bitcoin 0.3.24 BETA
|
||||
|
||||
Copyright (c) 2009-2011 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Intro
|
||||
-----
|
||||
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
||||
completely decentralized, without the need for a central server or trusted
|
||||
parties. Users hold the crypto keys to their own money and transact directly
|
||||
with each other, with the help of a P2P network to check for double-spending.
|
||||
|
||||
|
||||
Setup
|
||||
-----
|
||||
Unpack the files into a directory and run:
|
||||
bin/32/bitcoin (GUI, 32-bit)
|
||||
bin/32/bitcoind (headless, 32-bit)
|
||||
bin/64/bitcoin (GUI, 64-bit)
|
||||
bin/64/bitcoind (headless, 64-bit)
|
||||
|
||||
See the documentation at the bitcoin wiki:
|
||||
https://en.bitcoin.it/wiki/Main_Page
|
||||
|
||||
... for help and more information.
|
||||
34
doc/README_windows.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
Bitcoin 0.3.24 BETA
|
||||
|
||||
Copyright (c) 2009-2011 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Intro
|
||||
-----
|
||||
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
||||
completely decentralized, without the need for a central server or trusted
|
||||
parties. Users hold the crypto keys to their own money and transact directly
|
||||
with each other, with the help of a P2P network to check for double-spending.
|
||||
|
||||
|
||||
Setup
|
||||
-----
|
||||
Unpack the files into a directory and run bitcoin.exe.
|
||||
|
||||
If you have Microsoft Security Essentials, you need to add bitcoin.exe to its
|
||||
"Excluded processes" list. Microsoft Security Essentials->Settings tab,
|
||||
select Excluded processes, press Add, select bitcoin.exe, OK, Save changes.
|
||||
|
||||
The software automatically finds other nodes to connect to. You can
|
||||
enable Universal Plug and Play using a menu entry or set your firewall
|
||||
to forward port 8333 (TCP) to your computer so you can receive
|
||||
incoming connections. Bitcoin work without incoming connections,
|
||||
but allowing incoming connections helps the Bitcoin network.
|
||||
|
||||
See the bitcoin wiki at: https://en.bitcoin.it/wiki/Main_Page
|
||||
for more help and information.
|
||||
107
doc/build-msw.txt
Normal file
@@ -0,0 +1,107 @@
|
||||
Copyright (c) 2009-2011 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
WINDOWS BUILD NOTES
|
||||
===================
|
||||
|
||||
Compilers Supported
|
||||
-------------------
|
||||
MinGW GCC http://tdm-gcc.tdragon.net/
|
||||
TDM-GCC with gcc 4.5.1 was used to build this release.
|
||||
MSYS 1.0.11 was also used (sh needed to compile some dependencies)
|
||||
|
||||
|
||||
Candidate releases were built with MSVC 10.0 (2010), but
|
||||
compiling with Visual C++ caused rendering artifacts when
|
||||
bitcoin was run.
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
Libraries you need to download separately and build:
|
||||
|
||||
default path download
|
||||
wxWidgets \wxwidgets-2.9.1-mgw http://www.wxwidgets.org/downloads/
|
||||
OpenSSL \openssl-1.0.0d-mgw http://www.openssl.org/source/
|
||||
Berkeley DB \db-4.7.25.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
|
||||
Boost \boost-1.43.0-mgw http://www.boost.org/users/download/
|
||||
miniupnpc \upnpc-exe-win32-20110215 http://miniupnp.tuxfamily.org/files/
|
||||
|
||||
Their licenses:
|
||||
wxWidgets LGPL 2.1 with very liberal exceptions
|
||||
OpenSSL Old BSD license with the problematic advertising requirement
|
||||
Berkeley DB New BSD license with additional requirement that linked software must be free open source
|
||||
Boost MIT-like license
|
||||
miniupnpc New (3-clause) BSD license
|
||||
|
||||
Versions used in this release:
|
||||
wxWidgets 2.9.1
|
||||
OpenSSL 1.0.0d
|
||||
Berkeley DB 4.7.25.NC
|
||||
Boost 1.43.0
|
||||
miniupnpc 1.5-20110215
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
The UI layout is edited with wxFormBuilder. The project file is
|
||||
uiproject.fbp. It generates uibase.cpp and uibase.h, which define base
|
||||
classes that do the rote work of constructing all the UI elements.
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
DOS shell:
|
||||
cd \wxWidgets-2.9.1-mgw\build\msw
|
||||
mingw32-make -f makefile.gcc
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
MSYS shell:
|
||||
un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
|
||||
change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'
|
||||
|
||||
cd /c/openssl-1.0.0d-mgw
|
||||
./config
|
||||
make
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
MSYS shell:
|
||||
cd /c/db-4.7.25.NC-mgw/build_unix
|
||||
sh ../dist/configure --enable-mingw --enable-cxx
|
||||
make
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
DOS prompt:
|
||||
downloaded boost jam 3.1.18
|
||||
cd \boost-1.43.0-mgw
|
||||
bjam toolset=gcc --build-type=complete stage
|
||||
|
||||
Note:
|
||||
building with boost 1.45.0 failed because of boost ticket 4614, 4258
|
||||
builds fine with boost 1.43.0
|
||||
|
||||
MiniUPnPc
|
||||
---------
|
||||
Building miniupnpc failed on Windows Server 2003, thus it is expected that a binary copy will be used.
|
||||
See http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=642
|
||||
UPnP support is optional, make with USE_UPNP= to disable it.
|
||||
|
||||
Get upnpc-exe-win32-20110215.zip and unzip it to \upnpc-exe-win32-20110215
|
||||
Get miniupnpc-1.5.20110215.tar.gz and copy *.h to \upnpc-exe-win32-20110215\miniupnpc
|
||||
|
||||
Bitcoin
|
||||
-------
|
||||
DOS prompt:
|
||||
cd \bitcoin\src
|
||||
mingw32-make bitcoin.exe bitcoind.exe -f makefile.mingw
|
||||
strip bitcoin.exe
|
||||
strip bitcoind.exe
|
||||
@@ -1,217 +1,278 @@
|
||||
Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Mac OS X build instructions
|
||||
Laszlo Hanyecz (solar@heliacal.net)
|
||||
|
||||
|
||||
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
|
||||
|
||||
All of the commands should be executed in Terminal.app.. it's in
|
||||
/Applications/Utilities
|
||||
|
||||
You need to install XCode with all the options checked so that the compiler
|
||||
and everything is available in /usr not just /Developer
|
||||
I think it comes on the DVD but you can get the current version from
|
||||
http://developer.apple.com
|
||||
|
||||
|
||||
1. Pick a directory to work inside.. something like ~/bitcoin works. The
|
||||
structure I use looks like this:
|
||||
(~ is your home directory)
|
||||
|
||||
~/bitcoin
|
||||
~/bitcoin/trunk # source code
|
||||
~/bitcoin/deps # dependencies.. like libraries and headers needed to compile
|
||||
~/bitcoin/Bitcoin.app # the application bundle where you can run the app
|
||||
|
||||
Just execute: mkdir ~/bitcoin
|
||||
This will create the top dir for you..
|
||||
|
||||
WARNING: do not use the ~ notation with the configure scripts.. use the full
|
||||
name of the directory, for example /Users/james/bitcoin/deps for a user named
|
||||
'james'. In my examples I am using 'macosuser' so make sure you change that.
|
||||
|
||||
2. Check out the trunk version of the bitcoin code from subversion:
|
||||
|
||||
cd ~/bitcoin
|
||||
svn checkout https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk
|
||||
|
||||
This will make ~/bitcoin/trunk for you with all the files from subversion.
|
||||
|
||||
3. Get and build the dependencies
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
|
||||
Download from http://www.boost.org/users/download/
|
||||
I'm assuming it ended up in ~/Downloads..
|
||||
|
||||
mkdir ~/bitcoin/deps
|
||||
cd ~/bitcoin/deps
|
||||
tar xvjf ~/Downloads/boost_1_42_0.tar.bz2
|
||||
cd boost_1_42_0
|
||||
./bootstrap.sh
|
||||
./bjam architecture=combined address-model=32_64 macosx-version=10.6 macosx-version-min=10.5 link=static runtime-link=static --toolset=darwin --prefix=/Users/macosuser/bitcoin/deps install
|
||||
|
||||
This part takes a while.. use your judgement and fix it if something doesn't
|
||||
build for some reason.
|
||||
|
||||
Change the prefix to whatever your directory is (my username in this example
|
||||
is macosuser). I'm also running on 10.6 so i have macosx-version=10.6 change
|
||||
to 10.5 if you're using leopard.
|
||||
|
||||
This is what my output looked like at the end:
|
||||
...failed updating 2 targets...
|
||||
...skipped 144 targets...
|
||||
...updated 8074 targets...
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
|
||||
Download from http://www.openssl.org/source/
|
||||
|
||||
We would like to build this as a 32 bit/64 bit library so we actually build it
|
||||
2 times and join it together here.. If you downloaded with safari it already
|
||||
uncompressed it so it will just be a tar not a tar.gz
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/openssl-1.0.0.tar
|
||||
mv openssl-1.0.0 openssl-1.0.0-i386
|
||||
tar xvf ~/Downloads/openssl-1.0.0.tar
|
||||
mv openssl-1.0.0 openssl-1.0.0-x86_64
|
||||
# build i386 (32 bit intel) binary
|
||||
cd openssl-1.0.0-i386
|
||||
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/deps/openssl darwin-i386-cc && make
|
||||
make install # only do this on one of the architectures, to install the headers
|
||||
cd ..
|
||||
# build x86_64 (64 bit intel) binary
|
||||
cd openssl-1.0.0-x86_64
|
||||
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/deps/openssl darwin64-x86_64-cc && make
|
||||
cd ..
|
||||
|
||||
# combine the libs
|
||||
cd ~/bitcoin/deps
|
||||
lipo -arch i386 openssl-1.0.0-i386/libcrypto.a -arch x86_64 openssl-1.0.0-x86_64/libcrypto.a -o lib/libcrypto.a -create
|
||||
lipo -arch i386 openssl-1.0.0-i386/libssl.a -arch x86_64 openssl-1.0.0-x86_64/libssl.a -o lib/libssl.a -create
|
||||
|
||||
Verify your binaries
|
||||
|
||||
file lib/libcrypto.a
|
||||
|
||||
output should look like this:
|
||||
|
||||
ib/libcrypto.a: Mach-O universal binary with 2 architectures
|
||||
lib/libcrypto.a (for architecture i386): current ar archive random library
|
||||
lib/libcrypto.a (for architecture x86_64): current ar archive random library
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
|
||||
Download from http://freshmeat.net/projects/berkeleydb/
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/db-4.8.26.tar
|
||||
cd db-4.8.26/build_unix
|
||||
../dist/configure --prefix=/Users/macosuser/bitcoin/deps --enable-cxx && make && make install
|
||||
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
|
||||
This is the big one..
|
||||
|
||||
Check it out from svn
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk
|
||||
|
||||
This will make a wxWidgets-trunk directory in deps.
|
||||
|
||||
Use this script snippet, change your prefix to whatever your dir is:
|
||||
|
||||
PREFIX=~/bitcoin/deps
|
||||
SRCDIR="$PREFIX/wxWidgets-trunk"
|
||||
BUILDDIR="$SRCDIR/macbuild"
|
||||
|
||||
cd "$PREFIX" &&
|
||||
#svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk &&
|
||||
cd "$SRCDIR" &&
|
||||
|
||||
[ -f include/wx/hashmap.h.orig ] || cp include/wx/hashmap.h include/wx/hashmap.h.orig &&
|
||||
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashmap.h.orig > include/wx/hashmap.h &&
|
||||
|
||||
[ -f include/wx/hashset.h.orig ] || cp include/wx/hashset.h include/wx/hashset.h.orig &&
|
||||
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashset.h.orig > include/wx/hashset.h &&
|
||||
|
||||
|
||||
|
||||
rm -vrf "$BUILDDIR" &&
|
||||
mkdir "$BUILDDIR" &&
|
||||
cd "$BUILDDIR" &&
|
||||
|
||||
../configure --prefix="$PREFIX" \
|
||||
--with-osx_cocoa \
|
||||
--disable-shared \
|
||||
--disable-debug_flag \
|
||||
--with-macosx-version-min=10.5 \
|
||||
--enable-stl \
|
||||
--enable-utf8 \
|
||||
--enable-universal_binary \
|
||||
--with-libjpeg=builtin \
|
||||
--with-libpng=builtin \
|
||||
--with-regex=builtin \
|
||||
--with-libtiff=builtin \
|
||||
--with-zlib=builtin \
|
||||
--with-expat=builtin \
|
||||
--with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk &&
|
||||
|
||||
|
||||
find . -name Makefile |
|
||||
while read i; do
|
||||
echo $i;
|
||||
sed 's/-arch i386/-arch i386 -arch x86_64/g' < "$i" > "$i".new &&
|
||||
mv "$i" "$i".old &&
|
||||
mv "$i".new "$i";
|
||||
done
|
||||
|
||||
|
||||
|
||||
make &&
|
||||
make install
|
||||
|
||||
|
||||
|
||||
Now you should be able to build bitcoin
|
||||
|
||||
cd ~/bitcoin/trunk
|
||||
make -f makefile.osx bitcoin
|
||||
|
||||
Before you can run it, you need to create an application bundle for Mac OS.
|
||||
Create the directories in terminal using mkdir and copy the files into place.
|
||||
They are available at http://heliacal.net/~solar/bitcoin/mac-build/
|
||||
You need the Info.plist and the .ins file. The Contents/MacOS/bitcoin file is
|
||||
the output of the build.
|
||||
Your directory structure should look like this:
|
||||
|
||||
Bitcoin.app
|
||||
Bitcoin.app/Contents
|
||||
Bitcoin.app/Contents/Info.plist
|
||||
Bitcoin.app/Contents/MacOS
|
||||
Bitcoin.app/Contents/MacOS/bitcoin
|
||||
Bitcoin.app/Contents/Resources
|
||||
Bitcoin.app/Contents/Resources/BitcoinAppIcon.icns
|
||||
|
||||
To run it you can just click the Bitcoin.app in Finder, or just do open
|
||||
~/bitcoin/Bitcoin.app
|
||||
If you want to run it with arguments you can just run it without backgrounding
|
||||
by specifying the full name in terminal:
|
||||
~/bitcoin/Bitcoin.app/Contents/MacOS/bitcoin -addnode=192.75.207.66
|
||||
Copyright (c) 2010 Laszlo Hanyecz
|
||||
Portions Copyright (c) 2011 Douglas Huff
|
||||
Distributed under the MIT/X11 software license, see the accompanying file
|
||||
license.txt or http://www.opensource.org/licenses/mit-license.php. This
|
||||
product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic
|
||||
software written by Eric Young (eay@cryptsoft.com) and UPnP software written by
|
||||
Thomas Bernard.
|
||||
|
||||
|
||||
Mac OS X build instructions
|
||||
Laszlo Hanyecz <solar@heliacal.net>
|
||||
Douglas Huff <dhuff@jrbobdobbs.org>
|
||||
|
||||
|
||||
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
|
||||
|
||||
All of the commands should be executed in Terminal.app.. it's in
|
||||
/Applications/Utilities
|
||||
|
||||
You need to install XCode with all the options checked so that the compiler and
|
||||
everything is available in /usr not just /Developer I think it comes on the DVD
|
||||
but you can get the current version from http://developer.apple.com
|
||||
|
||||
|
||||
1. Pick a directory to work inside.. something like ~/bitcoin works. The
|
||||
structure I use looks like this:
|
||||
|
||||
(~ is your home directory)
|
||||
|
||||
~/bitcoin
|
||||
~/bitcoin/bitcoin # Upstream source tree
|
||||
~/bitcoin/src # source code (symlink to ~/bitcoin/bitcoin/src)
|
||||
~/bitcoin/deps # dependencies.. like libraries and headers needed to compile
|
||||
~/bitcoin/Bitcoin.app # the application bundle where you can run the app
|
||||
|
||||
Just execute: mkdir ~/bitcoin
|
||||
This will create the top dir for you..
|
||||
|
||||
WARNING: do not use the ~ notation with the configure scripts.. use the full
|
||||
name of the directory, for example /Users/james/bitcoin/deps for a user named
|
||||
'james'. In my examples I am using 'macosuser' so make sure you change that.
|
||||
|
||||
2. Check out the bitcoin code from github:
|
||||
|
||||
cd ~/bitcoin
|
||||
git clone https://github.com/bitcoin/bitcoin.git
|
||||
ln -s bitcoin/src src
|
||||
|
||||
This will make ~/bitcoin/bitcoin for you with all the files from git. This puts
|
||||
the actual sources in ~/bitcoin/bitcoin/src and create a symlink src in
|
||||
~/bitcoin to this location.
|
||||
|
||||
3. Get and build the dependencies
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
|
||||
Download from http://www.boost.org/users/download/
|
||||
I'm assuming it ended up in ~/Downloads..
|
||||
|
||||
mkdir ~/bitcoin/deps
|
||||
cd ~/bitcoin/deps
|
||||
tar xvjf ~/Downloads/boost_1_42_0.tar.bz2
|
||||
cd boost_1_42_0
|
||||
./bootstrap.sh
|
||||
./bjam architecture=combined address-model=32_64 macosx-version=10.5 macosx-version-min=10.5 link=static runtime-link=static --toolset=darwin --prefix=/Users/macosuser/bitcoin/deps install
|
||||
|
||||
If you're using Snow Leopard, you will need to specify 10.6 as your Mac OS X
|
||||
version instead of 10.5.
|
||||
|
||||
This part takes a while.. use your judgement and fix it if something doesn't
|
||||
build for some reason.
|
||||
|
||||
Change the prefix to whatever your directory is (my username in this example
|
||||
is macosuser). I'm also running on 10.6 so i have macosx-version=10.6 change
|
||||
to 10.5 if you're using leopard.
|
||||
|
||||
This is what my output looked like at the end:
|
||||
...failed updating 2 targets...
|
||||
...skipped 144 targets...
|
||||
...updated 8074 targets...
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
|
||||
(System or MacPorts openssl will work fine. Optional.)
|
||||
|
||||
Download from http://www.openssl.org/source/
|
||||
|
||||
We would like to build this as a 32 bit/64 bit library so we actually build it
|
||||
2 times and join it together here.. If you downloaded with safari it already
|
||||
uncompressed it so it will just be a tar not a tar.gz
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/openssl-1.0.0.tar
|
||||
mv openssl-1.0.0 openssl-1.0.0-i386
|
||||
tar xvf ~/Downloads/openssl-1.0.0.tar
|
||||
mv openssl-1.0.0 openssl-1.0.0-x86_64
|
||||
# build i386 (32 bit intel) binary
|
||||
cd openssl-1.0.0-i386
|
||||
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/bitcoin/deps/openssl darwin-i386-cc && make
|
||||
make install # only do this on one of the architectures, to install the headers
|
||||
cd ..
|
||||
# build x86_64 (64 bit intel) binary
|
||||
cd openssl-1.0.0-x86_64
|
||||
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/bitcoin/deps/openssl darwin64-x86_64-cc && make
|
||||
cd ..
|
||||
|
||||
# combine the libs
|
||||
cd ~/bitcoin/deps
|
||||
lipo -arch i386 openssl-1.0.0-i386/libcrypto.a -arch x86_64 openssl-1.0.0-x86_64/libcrypto.a -o lib/libcrypto.a -create
|
||||
lipo -arch i386 openssl-1.0.0-i386/libssl.a -arch x86_64 openssl-1.0.0-x86_64/libssl.a -o lib/libssl.a -create
|
||||
|
||||
Verify your binaries
|
||||
|
||||
file lib/libcrypto.a
|
||||
|
||||
output should look like this:
|
||||
|
||||
lib/libcrypto.a: Mach-O universal binary with 2 architectures
|
||||
lib/libcrypto.a (for architecture i386): current ar archive random library
|
||||
lib/libcrypto.a (for architecture x86_64): current ar archive random library
|
||||
|
||||
|
||||
miniupnpc
|
||||
---------
|
||||
|
||||
(MacPorts miniupnpc package works fine. You will need to modify makefile.)
|
||||
|
||||
The process for miniupnpc (optional) is similar to that of OpenSSL.
|
||||
|
||||
Download from http://miniupnp.tuxfamily.org/files/.
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/miniupnpc-1.5.tar
|
||||
mv miniupnpc-1.5 miniupnpc-1.5-x86_64
|
||||
tar xvf ~/Downloads/miniupnpc-1.5.tar
|
||||
mv miniupnpc-1.5 miniupnpc-1.5-i386
|
||||
# build x86_64 (64 bit intel) binary
|
||||
cd miniupnpc-1.5-x86_64
|
||||
export CFLAGS="-arch x86_64"
|
||||
export LDFLAGS="-arch x86_64"
|
||||
export PREFIX="/Users/macuser/bitcoin/deps"
|
||||
make && make install
|
||||
# build i386 (32 bit intel) binary
|
||||
cd miniupnpc-1.5-i386
|
||||
export CFLAGS="-arch i386"
|
||||
export LDFLAGS="-arch i386"
|
||||
export PREFIX="/Users/macuser/bitcoin/deps"
|
||||
make
|
||||
|
||||
# combine the libs
|
||||
cd ~/bitcoin/deps
|
||||
lipo -arch i386 miniupnpc-1.5-i386/libminiupnpc.a -arch x86_64 miniupnpc-1.5-x86_64/libminiupnpc.a -o lib/libminiupnpc.a -create
|
||||
|
||||
Verify your binaries
|
||||
|
||||
file lib/libminiupnpc.a
|
||||
|
||||
output should look like this:
|
||||
|
||||
lib/libminiupnpc.a: Mach-O universal binary with 2 architectures
|
||||
lib/libminiupnpc.a (for architecture i386): current ar archive random library
|
||||
lib/libminiupnpc.a (for architecture x86_64): current ar archive random library
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
|
||||
(System or MacPorts version work fine.)
|
||||
|
||||
Download from http://freshmeat.net/projects/berkeleydb/
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/db-4.8.26.tar
|
||||
cd db-4.8.26/build_unix
|
||||
../dist/configure --prefix=/Users/macosuser/bitcoin/deps --enable-cxx && make && make install
|
||||
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
|
||||
(The wxWidgets-devel MacPorts package will work but will throw annoying assertion dialogs.)
|
||||
|
||||
This is the big one..
|
||||
|
||||
Check it out from svn
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk
|
||||
|
||||
This will make a wxWidgets-trunk directory in deps.
|
||||
|
||||
Use this script snippet, change your prefix to whatever your dir is:
|
||||
|
||||
PREFIX=~/bitcoin/deps
|
||||
SRCDIR="$PREFIX/wxWidgets-trunk"
|
||||
BUILDDIR="$SRCDIR/macbuild"
|
||||
|
||||
cd "$PREFIX" &&
|
||||
#svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk &&
|
||||
cd "$SRCDIR" &&
|
||||
|
||||
[ -f include/wx/hashmap.h.orig ] || cp include/wx/hashmap.h include/wx/hashmap.h.orig &&
|
||||
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashmap.h.orig > include/wx/hashmap.h &&
|
||||
|
||||
[ -f include/wx/hashset.h.orig ] || cp include/wx/hashset.h include/wx/hashset.h.orig &&
|
||||
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashset.h.orig > include/wx/hashset.h &&
|
||||
|
||||
|
||||
|
||||
rm -vrf "$BUILDDIR" &&
|
||||
mkdir "$BUILDDIR" &&
|
||||
cd "$BUILDDIR" &&
|
||||
|
||||
../configure --prefix="$PREFIX" \
|
||||
--with-osx_cocoa \
|
||||
--disable-shared \
|
||||
--disable-debug_flag \
|
||||
--with-macosx-version-min=10.5 \
|
||||
--enable-stl \
|
||||
--enable-utf8 \
|
||||
--enable-universal_binary \
|
||||
--with-libjpeg=builtin \
|
||||
--with-libpng=builtin \
|
||||
--with-regex=builtin \
|
||||
--with-libtiff=builtin \
|
||||
--with-zlib=builtin \
|
||||
--with-expat=builtin \
|
||||
--with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk &&
|
||||
|
||||
|
||||
find . -name Makefile |
|
||||
while read i; do
|
||||
echo $i;
|
||||
sed 's/-arch i386/-arch i386 -arch x86_64/g' < "$i" > "$i".new &&
|
||||
mv "$i" "$i".old &&
|
||||
mv "$i".new "$i";
|
||||
done
|
||||
|
||||
|
||||
|
||||
make &&
|
||||
make install
|
||||
|
||||
|
||||
|
||||
Now you should be able to build bitcoin
|
||||
|
||||
cd ~/bitcoin/src
|
||||
make -f makefile.osx bitcoin
|
||||
|
||||
Before you can run it, you need to create an application bundle for Mac OS.
|
||||
|
||||
A bundle is provided in contrib/Bitcoin.app.
|
||||
|
||||
Copy the bitcoin binary in to it like this:
|
||||
cp -pR ~/bitcoin/bitcoin/contrib/Bitcoin.app ~/bitcoin/
|
||||
cp ~/bitcoin/src/bitcoin ~/bitcoin/Bitcoin.app/Contents/MacOS/
|
||||
|
||||
To run it you can just click the Bitcoin.app in Finder, or just do:
|
||||
open ~/bitcoin/Bitcoin.app
|
||||
|
||||
If you want to run it with arguments you can just run it without backgrounding
|
||||
by specifying the full name in terminal:
|
||||
|
||||
~/bitcoin/Bitcoin.app/Contents/MacOS/bitcoin -addnode=192.75.207.66
|
||||
|
||||
You can also run it with arguments in the background with output going to the
|
||||
normal places for apps (Console) like this:
|
||||
|
||||
open ~/bitcoin/Bitcoin.app --args -connect=192.75.207.66
|
||||
|
||||
It is advisable to relocate Bitcoin.app to /Applications or $HOME/Applications.
|
||||
|
||||
@@ -1,80 +1,110 @@
|
||||
Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
UNIX BUILD NOTES
|
||||
================
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libgtk2.0-dev
|
||||
sudo apt-get install libssl-dev
|
||||
sudo apt-get install libdb4.7-dev
|
||||
sudo apt-get install libdb4.7++-dev
|
||||
Boost 1.40+: sudo apt-get install libboost-all-dev
|
||||
or Boost 1.37: sudo apt-get install libboost1.37-dev
|
||||
|
||||
If using Boost 1.37, append -mt to the boost libraries in the makefile.
|
||||
|
||||
We're now using wxWidgets 2.9, which uses UTF-8. Don't try 2.8, it won't work.
|
||||
|
||||
You need to download wxWidgets from http://www.wxwidgets.org/downloads/
|
||||
and build it yourself. See the build instructions and configure parameters
|
||||
below.
|
||||
|
||||
Licenses of statically linked libraries:
|
||||
wxWidgets LGPL 2.1 with very liberal exceptions
|
||||
Berkeley DB New BSD license with additional requirement that linked software must be free open source
|
||||
Boost MIT-like license
|
||||
|
||||
Versions used in this release:
|
||||
GCC 4.3.3
|
||||
OpenSSL 0.9.8g
|
||||
wxWidgets 2.9.0
|
||||
Berkeley DB 4.7.25.NC
|
||||
Boost 1.37
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
The UI layout is edited with wxFormBuilder. The project file is
|
||||
uiproject.fbp. It generates uibase.cpp and uibase.h, which define base
|
||||
classes that do the rote work of constructing all the UI elements.
|
||||
|
||||
The release is built with GCC and then "strip bitcoin" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
cd /usr/local
|
||||
tar -xzvf wxWidgets-2.9.0.tar.gz
|
||||
cd wxWidgets-2.9.0
|
||||
mkdir buildgtk
|
||||
cd buildgtk
|
||||
../configure --with-gtk --enable-debug --disable-shared --enable-monolithic
|
||||
make
|
||||
sudo su
|
||||
make install
|
||||
ldconfig
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* files
|
||||
are incompatible. If you have to build Berkeley DB yourself:
|
||||
../dist/configure --enable-cxx
|
||||
make
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
If you need to build Boost yourself:
|
||||
sudo su
|
||||
./bootstrap.sh
|
||||
./bjam install
|
||||
Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
UNIX BUILD NOTES
|
||||
================
|
||||
|
||||
To Build
|
||||
--------
|
||||
|
||||
cd src/
|
||||
|
||||
make -f makefile.unix # Bitcoin with wxWidgets GUI
|
||||
or
|
||||
make -f makefile.unix bitcoind # Headless bitcoin
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libgtk2.0-dev
|
||||
sudo apt-get install libssl-dev
|
||||
sudo apt-get install libdb4.7-dev
|
||||
sudo apt-get install libdb4.7++-dev
|
||||
Boost 1.40+: sudo apt-get install libboost-all-dev
|
||||
or Boost 1.37: sudo apt-get install libboost1.37-dev
|
||||
|
||||
If using Boost 1.37, append -mt to the boost libraries in the makefile.
|
||||
|
||||
Requires wxWidgets 2.9.0 or greater, which uses UTF-8. Don't try 2.8, it
|
||||
won't work.
|
||||
|
||||
You need to download wxWidgets from http://www.wxwidgets.org/downloads/
|
||||
and build it yourself. See the build instructions and configure parameters
|
||||
below.
|
||||
|
||||
Requires miniupnpc for UPnP port mapping. It can be downloaded from
|
||||
http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and
|
||||
turned off by default. Set USE_UPNP to a different value to control this:
|
||||
USE_UPNP= no UPnP support, miniupnp not required;
|
||||
USE_UPNP=0 (the default) UPnP support turned off by default at runtime;
|
||||
USE_UPNP=1 UPnP support turned on by default at runtime.
|
||||
|
||||
Licenses of statically linked libraries:
|
||||
wxWidgets LGPL 2.1 with very liberal exceptions
|
||||
Berkeley DB New BSD license with additional requirement that linked software must be free open source
|
||||
Boost MIT-like license
|
||||
miniupnpc New (3-clause) BSD license
|
||||
|
||||
Versions used in this release:
|
||||
GCC 4.3.3
|
||||
OpenSSL 0.9.8g
|
||||
wxWidgets 2.9.0
|
||||
Berkeley DB 4.7.25.NC
|
||||
Boost 1.37
|
||||
miniupnpc 1.5
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
The UI layout is edited with wxFormBuilder. The project file is
|
||||
uiproject.fbp. It generates uibase.cpp and uibase.h, which define base
|
||||
classes that do the rote work of constructing all the UI elements.
|
||||
|
||||
The release is built with GCC and then "strip bitcoin" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
cd /usr/local
|
||||
tar -xzvf wxWidgets-2.9.0.tar.gz
|
||||
cd wxWidgets-2.9.0
|
||||
mkdir buildgtk
|
||||
cd buildgtk
|
||||
../configure --with-gtk --enable-debug --disable-shared --enable-monolithic --without-libpng --disable-svg
|
||||
make
|
||||
sudo su
|
||||
make install
|
||||
ldconfig
|
||||
|
||||
|
||||
miniupnpc
|
||||
---------
|
||||
tar -xzvf miniupnpc-1.5.tar.gz
|
||||
cd miniupnpc-1.5
|
||||
make
|
||||
sudo su
|
||||
make install
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* files
|
||||
are incompatible. If you have to build Berkeley DB yourself:
|
||||
../dist/configure --enable-cxx
|
||||
make
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
If you need to build Boost yourself:
|
||||
sudo su
|
||||
./bootstrap.sh
|
||||
./bjam install
|
||||
41
doc/coding.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
Please be consistent with the existing coding style.
|
||||
|
||||
Block style:
|
||||
|
||||
bool Function(char* psz, int n)
|
||||
{
|
||||
// Comment summarising what this section of code does
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
// When something fails, return early
|
||||
if (!Something())
|
||||
return false;
|
||||
...
|
||||
}
|
||||
|
||||
// Success return is usually at the end
|
||||
return true;
|
||||
}
|
||||
|
||||
- ANSI/Allman block style
|
||||
- 4 space indenting, no tabs
|
||||
- No extra spaces inside parenthesis; please don't do ( this )
|
||||
- No space after function names, one space after if, for and while
|
||||
|
||||
Variable names begin with the type in lowercase, like nSomeVariable.
|
||||
Please don't put the first word of the variable name in lowercase like
|
||||
someVariable.
|
||||
|
||||
Common types:
|
||||
n integer number: short, unsigned short, int, unsigned int,
|
||||
int64, uint64, sometimes char if used as a number
|
||||
d double, float
|
||||
f flag
|
||||
hash uint256
|
||||
p pointer or array, one p for each level of indirection
|
||||
psz pointer to null terminated string
|
||||
str string object
|
||||
v vector or similar list objects
|
||||
map map or multimap
|
||||
set set or multiset
|
||||
bn CBigNum
|
||||
45
doc/release-process.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
* update (commit) version in sources
|
||||
|
||||
* update (commit) version in OSX app bundle
|
||||
|
||||
* CFBundleShortVersionString should have value like 0.3.23
|
||||
* CFBundleVersion should have value like 323
|
||||
|
||||
* tag version in git
|
||||
|
||||
$ git tag -a v0.3.23
|
||||
|
||||
* write release notes. git shortlog helps a lot:
|
||||
|
||||
$ git shortlog --no-merges v0.3.22..
|
||||
|
||||
* create source-only archive
|
||||
|
||||
$ git archive --format=tar --prefix=bitcoin-0.3.23/ HEAD | \
|
||||
gzip -9c > ~/tmp/bitcoin-0.3.23-src.tar.gz
|
||||
|
||||
* perform gitian builds
|
||||
|
||||
* From the bitcoin source dir
|
||||
$ cd ../gitian-builder
|
||||
$ ./bin/gbuild --commit bitcoin=v0.3.23 ../bitcoin/contrib/gitian.yml
|
||||
$ ./bin/gbuild --commit bitcoin=v0.3.23 ../bitcoin/contrib/gitian-win32.yml
|
||||
|
||||
Build output expected:
|
||||
1. linux 32-bit and 64-bit binaries + source
|
||||
2. windows 32-bit binary + source
|
||||
3. windows installer
|
||||
|
||||
* upload source and builds to SF
|
||||
|
||||
* create SHA1SUMS for builds, and PGP-sign it
|
||||
|
||||
* update bitcoin.org version
|
||||
|
||||
* update forum version
|
||||
|
||||
* update wiki
|
||||
|
||||
* update wiki download links
|
||||
|
||||
|
||||
BIN
locale/cs/LC_MESSAGES/bitcoin.mo
Normal file
971
locale/cs/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,971 @@
|
||||
# This file is distributed under the same license as the Bitcoin package.
|
||||
# xHire <xhire@mujmalysvet.cz>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-05-26 21:44+0200\n"
|
||||
"PO-Revision-Date: 2011-05-26 22:31+0100\n"
|
||||
"Last-Translator: xHire <xhire@mujmalysvet.cz>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../src/net.cpp:1503
|
||||
#, c-format
|
||||
msgid "Unable to bind to port %d on this computer. Bitcoin is probably already running."
|
||||
msgstr "Nedaří se mi připojit na port %d na tomhle počítači. Bitcoin už pravděpodobně jednou běží."
|
||||
|
||||
#: ../../../src/ui.cpp:204
|
||||
#, c-format
|
||||
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
|
||||
msgstr "Tahle transakce přesahuje velikostní limit. Pořád ji ale můžeš poslat, pokud za ni zaplatíš poplatek %s, který půjde uzlům, které tvou transakci zpracují, a navíc tak podpoříš síť. Chceš zaplatit poplatek?"
|
||||
|
||||
#: ../../../src/ui.cpp:303
|
||||
msgid "Status"
|
||||
msgstr "Stav"
|
||||
|
||||
#: ../../../src/ui.cpp:304
|
||||
msgid "Date"
|
||||
msgstr "Datum"
|
||||
|
||||
#: ../../../src/ui.cpp:305
|
||||
msgid "Description"
|
||||
msgstr "Popis"
|
||||
|
||||
#: ../../../src/ui.cpp:306
|
||||
msgid "Debit"
|
||||
msgstr "Výdaje"
|
||||
|
||||
#: ../../../src/ui.cpp:307
|
||||
msgid "Credit"
|
||||
msgstr "Příjmy"
|
||||
|
||||
#: ../../../src/ui.cpp:513
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "Otevřeno pro %d bloků"
|
||||
|
||||
#: ../../../src/ui.cpp:515
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "Otřevřeno dokud %s"
|
||||
|
||||
#: ../../../src/ui.cpp:521
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/offline?"
|
||||
|
||||
#: ../../../src/ui.cpp:523
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/nepotvrzeno"
|
||||
|
||||
#: ../../../src/ui.cpp:525
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d potvrzení"
|
||||
|
||||
#: ../../../src/ui.cpp:610
|
||||
msgid "Generated"
|
||||
msgstr "Vygenerováno"
|
||||
|
||||
#: ../../../src/ui.cpp:618
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "Vygenerováno (%s dozraje po %d blocích)"
|
||||
|
||||
#: ../../../src/ui.cpp:622
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "Vygenerovaný - Varování: Tehnle blok nebyl obdržen žádným jiným uzlem a pravděpodobně nebude akceptován!"
|
||||
|
||||
#: ../../../src/ui.cpp:626
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "Vygenerováno (neakceptováno)"
|
||||
|
||||
#: ../../../src/ui.cpp:636
|
||||
msgid "From: "
|
||||
msgstr "Od: "
|
||||
|
||||
#: ../../../src/ui.cpp:660
|
||||
msgid "Received with: "
|
||||
msgstr "Přijato adresou: "
|
||||
|
||||
#: ../../../src/ui.cpp:706
|
||||
msgid "Payment to yourself"
|
||||
msgstr "Platba pro sebe sama"
|
||||
|
||||
#: ../../../src/ui.cpp:740
|
||||
msgid "To: "
|
||||
msgstr "Pro: "
|
||||
|
||||
#: ../../../src/ui.cpp:1055
|
||||
msgid " Generating"
|
||||
msgstr " Generuji"
|
||||
|
||||
#: ../../../src/ui.cpp:1057
|
||||
msgid "(not connected)"
|
||||
msgstr "(nepřipojen)"
|
||||
|
||||
#: ../../../src/ui.cpp:1060
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d spojení %d bloků %d transakcí"
|
||||
|
||||
#: ../../../src/ui.cpp:1165
|
||||
#: ../../../src/ui.cpp:2529
|
||||
msgid "New Receiving Address"
|
||||
msgstr "Nová Bitcoinová adresa"
|
||||
|
||||
#: ../../../src/ui.cpp:1166
|
||||
#: ../../../src/ui.cpp:2530
|
||||
msgid ""
|
||||
"You should use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"Měl bys vždy použít novou adresu pro každou platbu, kterou přijímáš.\n"
|
||||
"\n"
|
||||
"Označení"
|
||||
|
||||
#: ../../../src/ui.cpp:1235
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>Stav:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1240
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ", ještě nebylo rozesláno"
|
||||
|
||||
#: ../../../src/ui.cpp:1242
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ", rozesláno přes %d uzel"
|
||||
|
||||
#: ../../../src/ui.cpp:1244
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ", rozesláno přes %d uzlů"
|
||||
|
||||
#: ../../../src/ui.cpp:1248
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>Datum:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1256
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>Zdroj:</b> Vygenerováno<br>"
|
||||
|
||||
#: ../../../src/ui.cpp:1262
|
||||
#: ../../../src/ui.cpp:1280
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>Od:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1280
|
||||
msgid "unknown"
|
||||
msgstr "neznámo"
|
||||
|
||||
#: ../../../src/ui.cpp:1281
|
||||
#: ../../../src/ui.cpp:1305
|
||||
#: ../../../src/ui.cpp:1364
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>Pro:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1284
|
||||
msgid " (yours, label: "
|
||||
msgstr " (tvoje, označení: "
|
||||
|
||||
#: ../../../src/ui.cpp:1286
|
||||
msgid " (yours)"
|
||||
msgstr " (tvoje)"
|
||||
|
||||
#: ../../../src/ui.cpp:1323
|
||||
#: ../../../src/ui.cpp:1335
|
||||
#: ../../../src/ui.cpp:1381
|
||||
#: ../../../src/ui.cpp:1398
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr "<b>Příjem:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1325
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s dozraje po %d blocích)"
|
||||
|
||||
#: ../../../src/ui.cpp:1327
|
||||
msgid "(not accepted)"
|
||||
msgstr "(neakceptováno)"
|
||||
|
||||
#: ../../../src/ui.cpp:1372
|
||||
#: ../../../src/ui.cpp:1380
|
||||
#: ../../../src/ui.cpp:1395
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr "<b>Výdaj:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1386
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>Transakční poplatek:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1402
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>Čistá částka:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1409
|
||||
msgid "Message:"
|
||||
msgstr "Zpráva:"
|
||||
|
||||
#: ../../../src/ui.cpp:1411
|
||||
msgid "Comment:"
|
||||
msgstr "Komentář:"
|
||||
|
||||
#: ../../../src/ui.cpp:1414
|
||||
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
|
||||
msgstr "Vygenerované mince musí čekat 120 bloků, než mohou být utraceny. Když jsi vygeneroval tenhle blok, tak byl rozposlán do sítě, aby byl přidán do řetězce bloků. Pokud se mu nepodaří dostat se do řetězce, změní se na \"neakceptovaný\" a nebude utratitelný. To se občas může přihodit, pokud jiný uzel vygeneruje blok zhruba ve stejném okamžiku jako ty."
|
||||
|
||||
#: ../../../src/ui.cpp:1594
|
||||
msgid "Cannot write autostart/bitcoin.desktop file"
|
||||
msgstr "Nemohu zapisovat do souboru autostart/bitcoin.desktop"
|
||||
|
||||
#: ../../../src/ui.cpp:1630
|
||||
msgid "Main"
|
||||
msgstr "Hlavní"
|
||||
|
||||
#: ../../../src/ui.cpp:1638
|
||||
msgid "&Start Bitcoin on window system startup"
|
||||
msgstr "&Spustit Bitcoin při startu okenního systému"
|
||||
|
||||
#: ../../../src/ui.cpp:1645
|
||||
msgid "&Minimize on close"
|
||||
msgstr "&Zavřením pouze skrýt"
|
||||
|
||||
#: ../../../src/ui.cpp:1787
|
||||
#, c-format
|
||||
msgid "version %s"
|
||||
msgstr "verze %s"
|
||||
|
||||
#: ../../../src/ui.cpp:1899
|
||||
msgid "Error in amount "
|
||||
msgstr "Chyba v částce"
|
||||
|
||||
#: ../../../src/ui.cpp:1899
|
||||
#: ../../../src/ui.cpp:1904
|
||||
#: ../../../src/ui.cpp:1909
|
||||
#: ../../../src/ui.cpp:1944
|
||||
#: ../../../src/uibase.cpp:55
|
||||
msgid "Send Coins"
|
||||
msgstr "Pošli mince"
|
||||
|
||||
#: ../../../src/ui.cpp:1904
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "Částka překračuje stav účtu"
|
||||
|
||||
#: ../../../src/ui.cpp:1909
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "Celková částka přesahuje stav tvého účtu, když "
|
||||
|
||||
#: ../../../src/ui.cpp:1909
|
||||
msgid " transaction fee is included "
|
||||
msgstr " transakční poplatek je zahrnut"
|
||||
|
||||
#: ../../../src/ui.cpp:1927
|
||||
msgid "Payment sent "
|
||||
msgstr "Platba odeslána"
|
||||
|
||||
#: ../../../src/ui.cpp:1927
|
||||
#: ../../../src/ui.cpp:1932
|
||||
#: ../../../src/ui.cpp:2076
|
||||
#: ../../../src/ui.cpp:2229
|
||||
#: ../../../src/main.cpp:3997
|
||||
msgid "Sending..."
|
||||
msgstr "Posílám..."
|
||||
|
||||
#: ../../../src/ui.cpp:1944
|
||||
msgid "Invalid address "
|
||||
msgstr "Neplatná adresa"
|
||||
|
||||
#: ../../../src/ui.cpp:1997
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "Posílám %s %s"
|
||||
|
||||
#: ../../../src/ui.cpp:2070
|
||||
#: ../../../src/ui.cpp:2103
|
||||
msgid "CANCELLED"
|
||||
msgstr "ZRUŠENO"
|
||||
|
||||
#: ../../../src/ui.cpp:2074
|
||||
msgid "Cancelled"
|
||||
msgstr "Zrušeno"
|
||||
|
||||
#: ../../../src/ui.cpp:2076
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "Převod zrušen"
|
||||
|
||||
#: ../../../src/ui.cpp:2129
|
||||
msgid "Error: "
|
||||
msgstr "Chyba: "
|
||||
|
||||
#: ../../../src/ui.cpp:2143
|
||||
#: ../../../src/ui.cpp:2214
|
||||
#: ../../../src/main.cpp:4016
|
||||
msgid "Insufficient funds"
|
||||
msgstr "Nedostatek peněz"
|
||||
|
||||
#: ../../../src/ui.cpp:2148
|
||||
msgid "Connecting..."
|
||||
msgstr "Připojuji..."
|
||||
|
||||
#: ../../../src/ui.cpp:2153
|
||||
msgid "Unable to connect"
|
||||
msgstr "Nemohu se připojit"
|
||||
|
||||
#: ../../../src/ui.cpp:2158
|
||||
msgid "Requesting public key..."
|
||||
msgstr "Požaduji veřejný klíč..."
|
||||
|
||||
#: ../../../src/ui.cpp:2170
|
||||
msgid "Received public key..."
|
||||
msgstr "Přijat veřejný klíč..."
|
||||
|
||||
#: ../../../src/ui.cpp:2184
|
||||
msgid "Recipient is not accepting transactions sent by IP address"
|
||||
msgstr "Příjemce neakceptuje transakce poslané IP adresou"
|
||||
|
||||
#: ../../../src/ui.cpp:2186
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "Převod nebyl akceptován"
|
||||
|
||||
#: ../../../src/ui.cpp:2195
|
||||
msgid "Invalid response received"
|
||||
msgstr "Přišla neplatná odpověď"
|
||||
|
||||
#: ../../../src/ui.cpp:2210
|
||||
msgid "Creating transaction..."
|
||||
msgstr "Vytvářím transakci..."
|
||||
|
||||
#: ../../../src/ui.cpp:2222
|
||||
#, c-format
|
||||
msgid "This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds"
|
||||
msgstr "Tato transakce vyžaduje transakční poplatek nejméně %s kvůli svému objemu, komplexnosti nebo utrácení nedávno přijaté hotovosti"
|
||||
|
||||
#: ../../../src/ui.cpp:2224
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "Vytvoření transakce selhalo"
|
||||
|
||||
#: ../../../src/ui.cpp:2231
|
||||
msgid "Transaction aborted"
|
||||
msgstr "Transakce zrušena"
|
||||
|
||||
#: ../../../src/ui.cpp:2239
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "Spojení se ztratilo, takže transakce byla zrušena"
|
||||
|
||||
#: ../../../src/ui.cpp:2255
|
||||
msgid "Sending payment..."
|
||||
msgstr "Posílám platbu..."
|
||||
|
||||
#: ../../../src/ui.cpp:2261
|
||||
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Transakce byla odmítnuta. Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této."
|
||||
|
||||
#: ../../../src/ui.cpp:2270
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "Čekám na potvrzení..."
|
||||
|
||||
#: ../../../src/ui.cpp:2288
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"The transaction is recorded and will credit to the recipient,\n"
|
||||
"but the comment information will be blank."
|
||||
msgstr ""
|
||||
"Platba byla poslána, ale příjemce není schopen ji ověřit.\n"
|
||||
"Transakce je zaznamenána a bude připsána příjemci,\n"
|
||||
"ale poznámka u platby bude prázdná."
|
||||
|
||||
#: ../../../src/ui.cpp:2297
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "Platba byla odeslána, ale přišla neplatná odpověď"
|
||||
|
||||
#: ../../../src/ui.cpp:2303
|
||||
msgid "Payment completed"
|
||||
msgstr "Platba je kompletní"
|
||||
|
||||
#: ../../../src/ui.cpp:2334
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2517
|
||||
msgid "Name"
|
||||
msgstr "Jméno"
|
||||
|
||||
#: ../../../src/ui.cpp:2335
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2517
|
||||
msgid "Address"
|
||||
msgstr "Adresa"
|
||||
|
||||
#: ../../../src/ui.cpp:2337
|
||||
#: ../../../src/ui.cpp:2492
|
||||
msgid "Label"
|
||||
msgstr "Označení"
|
||||
|
||||
#: ../../../src/ui.cpp:2338
|
||||
#: ../../../src/uibase.cpp:837
|
||||
msgid "Bitcoin Address"
|
||||
msgstr "Bitcoinová adresa"
|
||||
|
||||
#: ../../../src/ui.cpp:2462
|
||||
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
|
||||
msgstr "Tohle je jedna z tvých vlastních adres pro příjem plateb a nemůže být zadána do adresáře."
|
||||
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2486
|
||||
msgid "Edit Address"
|
||||
msgstr "Upravit adresu"
|
||||
|
||||
#: ../../../src/ui.cpp:2492
|
||||
msgid "Edit Address Label"
|
||||
msgstr "Upravit označení adresy"
|
||||
|
||||
#: ../../../src/ui.cpp:2517
|
||||
#: ../../../src/ui.cpp:2523
|
||||
msgid "Add Address"
|
||||
msgstr "Přidat adresu"
|
||||
|
||||
#: ../../../src/ui.cpp:2600
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2602
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - Generování"
|
||||
|
||||
#: ../../../src/ui.cpp:2604
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (nepřipojen)"
|
||||
|
||||
#: ../../../src/ui.cpp:2683
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "&Otevřít Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2684
|
||||
msgid "&Send Bitcoins"
|
||||
msgstr "&Poslat Bitcoiny"
|
||||
|
||||
#: ../../../src/ui.cpp:2685
|
||||
msgid "O&ptions..."
|
||||
msgstr "&Možnosti..."
|
||||
|
||||
#: ../../../src/ui.cpp:2688
|
||||
#: ../../../src/uibase.cpp:25
|
||||
msgid "E&xit"
|
||||
msgstr "&Konec"
|
||||
|
||||
#: ../../../src/ui.cpp:2904
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "Program havaroval a bude ukončen."
|
||||
|
||||
#: ../../../src/main.cpp:1866
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "Upozornění: Na disku je málo místa"
|
||||
|
||||
#: ../../../src/main.cpp:3990
|
||||
#, c-format
|
||||
msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "
|
||||
msgstr "Chyba: Tato transakce vyžaduje transakční poplatek nejméně %s kvůli svému objemu, komplexnosti nebo utrácení nedávno přijaté hotovosti"
|
||||
|
||||
#: ../../../src/main.cpp:3992
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "Chyba: Vytvoření transakce selhalo"
|
||||
|
||||
#: ../../../src/main.cpp:4001
|
||||
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Chyba: Transakce byla odmítnuta. Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této."
|
||||
|
||||
#: ../../../src/main.cpp:4014
|
||||
msgid "Invalid amount"
|
||||
msgstr "Neplatná částka"
|
||||
|
||||
#: ../../../src/main.cpp:4021
|
||||
msgid "Invalid bitcoin address"
|
||||
msgstr "Neplatná Bitcoinová adresa"
|
||||
|
||||
#: ../../../src/rpc.cpp:1802
|
||||
#: ../../../src/rpc.cpp:1804
|
||||
#, c-format
|
||||
msgid "To use the %s option"
|
||||
msgstr "Pro použití volby %s"
|
||||
|
||||
#: ../../../src/rpc.cpp:1806
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Warning: %s, you must set rpcpassword=<password>\n"
|
||||
"in the configuration file: %s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions.\n"
|
||||
msgstr ""
|
||||
"Varování: %s, musíš nastavit rpcpassword=<heslo>\n"
|
||||
"v konfiguračním souboru: %s\n"
|
||||
"Pokud tenhle soubor neexistuje, vytvoř ho s oprávněním pro čtení pouze pro vlastníka.\n"
|
||||
|
||||
#: ../../../src/rpc.cpp:1974
|
||||
#, c-format
|
||||
msgid ""
|
||||
"You must set rpcpassword=<password> in the configuration file:\n"
|
||||
"%s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions."
|
||||
msgstr ""
|
||||
"Musíš nastavit rpcpassword=<heslo> v konfiguračním souboru:\n"
|
||||
"%s\n"
|
||||
"Pokud tenhle soubor neexistuje, vytvoř ho s oprávněním pro čtení pouze pro vlastníka."
|
||||
|
||||
#: ../../../src/util.cpp:866
|
||||
msgid "Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."
|
||||
msgstr "Varování: Prosím zkontroluj, že datum a čas jsou na tvém počítači správně nastaveny. Pokud jsou nastaveny špatně, Bitcoin nebude fungovat správně."
|
||||
|
||||
#: ../../../src/util.cpp:899
|
||||
msgid "beta"
|
||||
msgstr "beta"
|
||||
|
||||
#: ../../../src/uibase.cpp:28
|
||||
msgid "&File"
|
||||
msgstr "&Soubor"
|
||||
|
||||
#: ../../../src/uibase.cpp:32
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "Tvá Bitcoinová &adresa..."
|
||||
|
||||
#: ../../../src/uibase.cpp:36
|
||||
msgid "&Options..."
|
||||
msgstr "M&ožnosti"
|
||||
|
||||
#: ../../../src/uibase.cpp:39
|
||||
msgid "&Settings"
|
||||
msgstr "Nas&tavení"
|
||||
|
||||
#: ../../../src/uibase.cpp:43
|
||||
msgid "&About..."
|
||||
msgstr "&O programu"
|
||||
|
||||
#: ../../../src/uibase.cpp:46
|
||||
msgid "&Help"
|
||||
msgstr "&Nápověda"
|
||||
|
||||
#: ../../../src/uibase.cpp:56
|
||||
msgid "Address Book"
|
||||
msgstr "Adresář"
|
||||
|
||||
#: ../../../src/uibase.cpp:69
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "Tvá Bitcoinová adresa:"
|
||||
|
||||
#: ../../../src/uibase.cpp:76
|
||||
msgid " &New... "
|
||||
msgstr " &Nová..."
|
||||
|
||||
#: ../../../src/uibase.cpp:79
|
||||
#: ../../../src/uibase.cpp:780
|
||||
#: ../../../src/uibase.cpp:883
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr " &Kopírovat do schránky"
|
||||
|
||||
#: ../../../src/uibase.cpp:93
|
||||
msgid "Balance:"
|
||||
msgstr "Stav účtu:"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " All"
|
||||
msgstr " Vše"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Sent"
|
||||
msgstr " Odeslané"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Received"
|
||||
msgstr " Přijaté"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " In Progress"
|
||||
msgstr " Pracuje se na tom"
|
||||
|
||||
#: ../../../src/uibase.cpp:130
|
||||
msgid "All Transactions"
|
||||
msgstr "Všechny transakce"
|
||||
|
||||
#: ../../../src/uibase.cpp:141
|
||||
msgid "Sent/Received"
|
||||
msgstr "Odeslané/Přijaté"
|
||||
|
||||
#: ../../../src/uibase.cpp:152
|
||||
msgid "Sent"
|
||||
msgstr "Odeslané"
|
||||
|
||||
#: ../../../src/uibase.cpp:163
|
||||
msgid "Received"
|
||||
msgstr "Přijaté"
|
||||
|
||||
#: ../../../src/uibase.cpp:302
|
||||
#: ../../../src/uibase.cpp:443
|
||||
#: ../../../src/uibase.cpp:542
|
||||
#: ../../../src/uibase.cpp:722
|
||||
#: ../../../src/uibase.cpp:783
|
||||
#: ../../../src/uibase.cpp:892
|
||||
#: ../../../src/uibase.cpp:981
|
||||
msgid "OK"
|
||||
msgstr "&Budiž"
|
||||
|
||||
#: ../../../src/uibase.cpp:345
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
msgstr "&Spustit Bitcoin při startu systému"
|
||||
|
||||
#: ../../../src/uibase.cpp:348
|
||||
msgid "&Minimize to the tray instead of the taskbar"
|
||||
msgstr "&Minimalizovávat do ikony v panelu"
|
||||
|
||||
#: ../../../src/uibase.cpp:351
|
||||
msgid "Map port using &UPnP"
|
||||
msgstr "Namapovat port přes &UPnP"
|
||||
|
||||
#: ../../../src/uibase.cpp:354
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "Zavřením &minimalizovat do ikony"
|
||||
|
||||
#: ../../../src/uibase.cpp:360
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "&Připojit přes socks4 proxy:"
|
||||
|
||||
#: ../../../src/uibase.cpp:371
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "&IP adresa proxy:"
|
||||
|
||||
#: ../../../src/uibase.cpp:379
|
||||
msgid " &Port:"
|
||||
msgstr " &Port:"
|
||||
|
||||
#: ../../../src/uibase.cpp:392
|
||||
msgid "Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."
|
||||
msgstr "Dobrovolný transakční poplatek za každý započatý KB napomáhá tomu, aby tvé transakce byly rychle zpracovány. Většina transakcí má do 1 KB. Doporučená výše poplatku je 0.01."
|
||||
|
||||
#: ../../../src/uibase.cpp:399
|
||||
msgid "Pay transaction fee:"
|
||||
msgstr "Výše transakčního poplatku:"
|
||||
|
||||
#: ../../../src/uibase.cpp:420
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:424
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:446
|
||||
#: ../../../src/uibase.cpp:668
|
||||
#: ../../../src/uibase.cpp:727
|
||||
#: ../../../src/uibase.cpp:786
|
||||
#: ../../../src/uibase.cpp:895
|
||||
#: ../../../src/uibase.cpp:984
|
||||
msgid "Cancel"
|
||||
msgstr "&Zrušit"
|
||||
|
||||
#: ../../../src/uibase.cpp:449
|
||||
msgid "&Apply"
|
||||
msgstr "&Použít"
|
||||
|
||||
#: ../../../src/uibase.cpp:508
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../src/uibase.cpp:514
|
||||
msgid "version"
|
||||
msgstr "verze"
|
||||
|
||||
#: ../../../src/uibase.cpp:525
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2011 Vývojáři Bitcoinu\n"
|
||||
"\n"
|
||||
"Tohle je experimentální program.\n"
|
||||
"\n"
|
||||
"Šířen pod licencí MIT/X11, viz přiložený soubor license.txt nebo \n"
|
||||
"http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití \n"
|
||||
"v OpenSSL Toolkitu (http://www.openssl.org/) a kryptografický program od \n"
|
||||
"Erika Younga (eay@cryptsoft.com) a program UPnP od Thomase Bernarda."
|
||||
|
||||
#: ../../../src/uibase.cpp:581
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
msgstr "Vlož Bitcoinovou adresu (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
|
||||
#: ../../../src/uibase.cpp:595
|
||||
msgid "Pay &To:"
|
||||
msgstr "&Komu:"
|
||||
|
||||
#: ../../../src/uibase.cpp:610
|
||||
msgid "&Paste"
|
||||
msgstr "&Vložit"
|
||||
|
||||
#: ../../../src/uibase.cpp:613
|
||||
msgid " Address &Book..."
|
||||
msgstr " &Adresář..."
|
||||
|
||||
#: ../../../src/uibase.cpp:620
|
||||
msgid "&Amount:"
|
||||
msgstr "&Částka"
|
||||
|
||||
#: ../../../src/uibase.cpp:630
|
||||
msgid "T&ransfer:"
|
||||
msgstr "&Převod:"
|
||||
|
||||
#: ../../../src/uibase.cpp:636
|
||||
msgid " Standard"
|
||||
msgstr " Standard"
|
||||
|
||||
#: ../../../src/uibase.cpp:663
|
||||
msgid "&Send"
|
||||
msgstr "&Poslat"
|
||||
|
||||
#: ../../../src/uibase.cpp:711
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Připojuji..."
|
||||
|
||||
#: ../../../src/uibase.cpp:761
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
|
||||
msgstr "Tohle jsou tvé Bitcoinové adresy na příjem plateb. Asi budeš chtít dát jinou adresu každému odesílateli, abys věděl, kdo ti kolik platil. Označená adresa bude zobrazena v hlavním okně."
|
||||
|
||||
#: ../../../src/uibase.cpp:774
|
||||
#: ../../../src/uibase.cpp:886
|
||||
msgid "&Edit..."
|
||||
msgstr "&Upravit..."
|
||||
|
||||
#: ../../../src/uibase.cpp:777
|
||||
#: ../../../src/uibase.cpp:889
|
||||
msgid " &New Address... "
|
||||
msgstr " &Nová adresa..."
|
||||
|
||||
#: ../../../src/uibase.cpp:849
|
||||
msgid "Sending"
|
||||
msgstr "Cizí adresy (pro odesílání)"
|
||||
|
||||
#: ../../../src/uibase.cpp:857
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
|
||||
msgstr "Tohle jsou tvé Bitcoinové adresy na příjem plateb. Můžeš dát jinou adresu každému odesílateli, abys věděl, kdo ti kolik platil. Označená adresa bude zobrazena v hlavním okně."
|
||||
|
||||
#: ../../../src/uibase.cpp:870
|
||||
msgid "Receiving"
|
||||
msgstr "Tvoje adresy (pro příjem)"
|
||||
|
||||
#: ../../../src/uibase.cpp:880
|
||||
msgid "&Delete"
|
||||
msgstr "&Smazat"
|
||||
|
||||
#: ../../../src/init.cpp:142
|
||||
msgid "Bitcoin version"
|
||||
msgstr "Bitcoin verze"
|
||||
|
||||
#: ../../../src/init.cpp:143
|
||||
msgid "Usage:"
|
||||
msgstr "Užití:"
|
||||
|
||||
#: ../../../src/init.cpp:145
|
||||
msgid "Send command to -server or bitcoind\n"
|
||||
msgstr "Poslat příkaz pro -server nebo bitcoind\n"
|
||||
|
||||
#: ../../../src/init.cpp:146
|
||||
msgid "List commands\n"
|
||||
msgstr "Výpis příkazů\n"
|
||||
|
||||
#: ../../../src/init.cpp:147
|
||||
msgid "Get help for a command\n"
|
||||
msgstr "Získat nápovědu pro příkaz\n"
|
||||
|
||||
#: ../../../src/init.cpp:148
|
||||
msgid "Options:\n"
|
||||
msgstr "Možnosti:\n"
|
||||
|
||||
#: ../../../src/init.cpp:149
|
||||
msgid "Specify configuration file (default: bitcoin.conf)\n"
|
||||
msgstr "Konfigurační soubor (výchozí: bitcoin.conf)\n"
|
||||
|
||||
#: ../../../src/init.cpp:150
|
||||
msgid "Specify pid file (default: bitcoind.pid)\n"
|
||||
msgstr "PID soubor (výchozí: bitcoind.pid)\n"
|
||||
|
||||
#: ../../../src/init.cpp:151
|
||||
msgid "Generate coins\n"
|
||||
msgstr "Generovat mince\n"
|
||||
|
||||
#: ../../../src/init.cpp:152
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "Negenerovat mince\n"
|
||||
|
||||
#: ../../../src/init.cpp:153
|
||||
msgid "Start minimized\n"
|
||||
msgstr "Startovat minimalizovaně\n"
|
||||
|
||||
#: ../../../src/init.cpp:154
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "Adresář pro data\n"
|
||||
|
||||
#: ../../../src/init.cpp:155
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
msgstr "Připojovat se skrz socks4 proxy\n"
|
||||
|
||||
#: ../../../src/init.cpp:156
|
||||
msgid "Allow DNS lookups for addnode and connect\n"
|
||||
msgstr "Povolit DNS dotazy pro addnode (přidání uzlu) a connect (připojení)\n"
|
||||
|
||||
#: ../../../src/init.cpp:157
|
||||
msgid "Add a node to connect to\n"
|
||||
msgstr "Přidat uzel, ke kterému se připojit\n"
|
||||
|
||||
#: ../../../src/init.cpp:158
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "Připojovat se pouze k udanému uzlu\n"
|
||||
|
||||
#: ../../../src/init.cpp:159
|
||||
msgid "Don't accept connections from outside\n"
|
||||
msgstr "Nepřijímat připojení zvenčí\n"
|
||||
|
||||
#: ../../../src/init.cpp:162
|
||||
msgid "Don't attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Nesnažit se použít UPnP k namapování naslouchacího portu\n"
|
||||
|
||||
#: ../../../src/init.cpp:164
|
||||
msgid "Attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Snažit se použít UPnP k namapování naslouchacího portu\n"
|
||||
|
||||
#: ../../../src/init.cpp:167
|
||||
msgid "Fee per KB to add to transactions you send\n"
|
||||
msgstr "Poplatek za KB, který se přidá ke každé odeslané transakci\n"
|
||||
|
||||
#: ../../../src/init.cpp:169
|
||||
msgid "Accept command line and JSON-RPC commands\n"
|
||||
msgstr "Akceptovat příkazy z příkazové řádky a přes JSON-RPC\n"
|
||||
|
||||
#: ../../../src/init.cpp:172
|
||||
msgid "Run in the background as a daemon and accept commands\n"
|
||||
msgstr "Běžet na pozadí jako démon a akceptovat příkazy\n"
|
||||
|
||||
#: ../../../src/init.cpp:174
|
||||
msgid "Use the test network\n"
|
||||
msgstr "Použít testovací síť\n"
|
||||
|
||||
#: ../../../src/init.cpp:175
|
||||
msgid "Username for JSON-RPC connections\n"
|
||||
msgstr "Uživatelské jméno pro JSON-RPC spojení\n"
|
||||
|
||||
#: ../../../src/init.cpp:176
|
||||
msgid "Password for JSON-RPC connections\n"
|
||||
msgstr "Heslo pro JSON-RPC spojení\n"
|
||||
|
||||
#: ../../../src/init.cpp:177
|
||||
msgid "Listen for JSON-RPC connections on <port> (default: 8332)\n"
|
||||
msgstr "Čekat na JSON-RPC spojení na <portu> (výchozí: 8332)\n"
|
||||
|
||||
#: ../../../src/init.cpp:178
|
||||
msgid "Allow JSON-RPC connections from specified IP address\n"
|
||||
msgstr "Povolit JSON-RPC spojení ze specifikované IP adresy\n"
|
||||
|
||||
#: ../../../src/init.cpp:179
|
||||
msgid "Send commands to node running on <ip> (default: 127.0.0.1)\n"
|
||||
msgstr "Posílat příkazy uzlu běžícím na <ip> (výchozí: 127.0.0.1)\n"
|
||||
|
||||
#: ../../../src/init.cpp:180
|
||||
msgid "Set key pool size to <n> (default: 100)\n"
|
||||
msgstr "Nastavit zásobník klíčů na velikost <n> (výchozí: 100)\n"
|
||||
|
||||
#: ../../../src/init.cpp:181
|
||||
msgid "Rescan the block chain for missing wallet transactions\n"
|
||||
msgstr "Přeskenovat řetězec bloků na chybějící transakce peněženky\n"
|
||||
|
||||
#: ../../../src/init.cpp:185
|
||||
msgid ""
|
||||
"\n"
|
||||
"SSL options: (see the Bitcoin Wiki for SSL setup instructions)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Možnosti SSL: (viz instrukce nastavení SSL v Bitcoin Wiki)\n"
|
||||
|
||||
#: ../../../src/init.cpp:186
|
||||
msgid "Use OpenSSL (https) for JSON-RPC connections\n"
|
||||
msgstr "Použít OpenSSL (https) pro JSON-RPC spojení\n"
|
||||
|
||||
#: ../../../src/init.cpp:187
|
||||
msgid "Server certificate file (default: server.cert)\n"
|
||||
msgstr "Soubor se serverovým certifikátem (výchozí: server.cert)\n"
|
||||
|
||||
#: ../../../src/init.cpp:188
|
||||
msgid "Server private key (default: server.pem)\n"
|
||||
msgstr "Soubor se serverovým soukromým klíčem (výchozí: server.pem)\n"
|
||||
|
||||
#: ../../../src/init.cpp:189
|
||||
msgid "Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
msgstr "Akceptovatelné šifry (výchozí: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
|
||||
#: ../../../src/init.cpp:193
|
||||
msgid "This help message\n"
|
||||
msgstr "Tato nápověda\n"
|
||||
|
||||
#: ../../../src/init.cpp:330
|
||||
#, c-format
|
||||
msgid "Cannot obtain a lock on data directory %s. Bitcoin is probably already running."
|
||||
msgstr "Nedaří se mi získat zámek na datový adresář %s. Bitcoin pravděpodobně už jednou běží."
|
||||
|
||||
#: ../../../src/init.cpp:356
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "Chyba při načítání addr.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:362
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "Chyba při načítání blkindex.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:369
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "Chyba při načítání wallet.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:449
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "Neplatná -proxy adresa"
|
||||
|
||||
#: ../../../src/init.cpp:472
|
||||
msgid "Invalid amount for -paytxfee=<amount>"
|
||||
msgstr "Neplatná částka pro -paytxfee=<částka>"
|
||||
|
||||
#: ../../../src/init.cpp:476
|
||||
msgid "Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."
|
||||
msgstr "Varování: -paytxfee je nastaveno velmi vysoko. Toto je transakční poplatek, který zaplatíš za každou poslanou transakci."
|
||||
|
||||
#: ../../../src/uibase.h:147
|
||||
msgid "Transaction Details"
|
||||
msgstr "Detaily transakce"
|
||||
|
||||
#: ../../../src/uibase.h:199
|
||||
msgid "Options"
|
||||
msgstr "Možnosti"
|
||||
|
||||
#: ../../../src/uibase.h:228
|
||||
msgid "About Bitcoin"
|
||||
msgstr "O Bitcoinu"
|
||||
|
||||
#: ../../../src/uibase.h:337
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "Tvá Bitcoinová adresa"
|
||||
|
||||
BIN
locale/eo/LC_MESSAGES/bitcoin.mo
Normal file
1029
locale/eo/LC_MESSAGES/bitcoin.po
Normal file
@@ -351,8 +351,8 @@ msgstr "&Réduire à la fermeture"
|
||||
|
||||
#: ../../../ui.cpp:1610
|
||||
#, c-format
|
||||
msgid "version %d.%d.%d beta"
|
||||
msgstr "version %d.%d.%d beta"
|
||||
msgid "version %s%s BETA"
|
||||
msgstr "version %s%s BETA"
|
||||
|
||||
#: ../../../ui.cpp:1696
|
||||
msgid "Will appear as \"From: Unknown\""
|
||||
@@ -559,11 +559,6 @@ msgstr "&Ouvrir Bitcoin"
|
||||
msgid "O&ptions..."
|
||||
msgstr "O&ptions..."
|
||||
|
||||
#: ../../../ui.cpp:2521
|
||||
#: ../../../uibase.cpp:32
|
||||
msgid "&Generate Coins"
|
||||
msgstr "&Générer des pièces"
|
||||
|
||||
#: ../../../ui.cpp:2524
|
||||
#: ../../../uibase.cpp:25
|
||||
msgid "E&xit"
|
||||
@@ -730,7 +725,7 @@ msgstr "version"
|
||||
|
||||
#: ../../../uibase.cpp:557
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"Copyright (c) 2009-2010 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
@@ -739,9 +734,9 @@ msgid ""
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com)."
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"Copyright (c) 2009-2010 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"Ceci est un logiciel expérimental.\n"
|
||||
"\n"
|
||||
@@ -750,7 +745,7 @@ msgstr ""
|
||||
"\n"
|
||||
"Ce produit comprend des composants logiciels développés pour le Projet OpenSSL \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) ainsi que des composants cryptographiques \n"
|
||||
"écrits par Eric Young (eay@cryptsoft.com)."
|
||||
"écrits par Eric Young (eay@cryptsoft.com) et des logiciels UPnP écrits par Thomas Bernard.."
|
||||
|
||||
#: ../../../uibase.cpp:613
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
|
||||
|
||||
BIN
locale/lt/LC_MESSAGES/bitcoin.mo
Normal file
971
locale/lt/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,971 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-05-17 14:07+0100\n"
|
||||
"PO-Revision-Date: 2011-05-17 14:09+0100\n"
|
||||
"Last-Translator: Anonymous <anon@none>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../src/net.cpp:1503
|
||||
#, c-format
|
||||
msgid "Unable to bind to port %d on this computer. Bitcoin is probably already running."
|
||||
msgstr "Neįmanoma prisijungti prie šio kompiuterio porto %d. Bitcoin programa tikriausiai jau yra paleista"
|
||||
|
||||
#: ../../../src/ui.cpp:204
|
||||
#, c-format
|
||||
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
|
||||
msgstr "Šis pervedimas viršija dydžio limitą. Jūs galite siūsti šią suma sumokėję %s mokestį, kuris bus skirtas nodams už persiuntimą ir padėti tinklui. Ar sutinkate pridėti ši mokestį?"
|
||||
|
||||
#: ../../../src/ui.cpp:303
|
||||
msgid "Status"
|
||||
msgstr "Būklė"
|
||||
|
||||
#: ../../../src/ui.cpp:304
|
||||
msgid "Date"
|
||||
msgstr "Data"
|
||||
|
||||
#: ../../../src/ui.cpp:305
|
||||
msgid "Description"
|
||||
msgstr "Apibūdinimas"
|
||||
|
||||
#: ../../../src/ui.cpp:306
|
||||
msgid "Debit"
|
||||
msgstr "Debetas"
|
||||
|
||||
#: ../../../src/ui.cpp:307
|
||||
msgid "Credit"
|
||||
msgstr "Kreditas"
|
||||
|
||||
#: ../../../src/ui.cpp:513
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "Atidaryta %d blokams"
|
||||
|
||||
#: ../../../src/ui.cpp:515
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "Atidaryta iki %s"
|
||||
|
||||
#: ../../../src/ui.cpp:521
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/neprisijunges?"
|
||||
|
||||
#: ../../../src/ui.cpp:523
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/ nepatvirtinta"
|
||||
|
||||
#: ../../../src/ui.cpp:525
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d patvirtinta"
|
||||
|
||||
#: ../../../src/ui.cpp:610
|
||||
msgid "Generated"
|
||||
msgstr "Sugeneruota"
|
||||
|
||||
#: ../../../src/ui.cpp:618
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "Sugeneruota (%s bus galima naudoti už %d blokų)"
|
||||
|
||||
#: ../../../src/ui.cpp:622
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "Sugeneruota - Perspėjimas: Šio bloko negavo kiti nodai ir jis tikriausiai nebus priimtas!"
|
||||
|
||||
#: ../../../src/ui.cpp:626
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "Sugeneruota (nepriimta)"
|
||||
|
||||
#: ../../../src/ui.cpp:636
|
||||
msgid "From: "
|
||||
msgstr "Nuo: "
|
||||
|
||||
#: ../../../src/ui.cpp:660
|
||||
msgid "Received with: "
|
||||
msgstr "Priimta su: "
|
||||
|
||||
#: ../../../src/ui.cpp:706
|
||||
msgid "Payment to yourself"
|
||||
msgstr "Pervedimas sau"
|
||||
|
||||
#: ../../../src/ui.cpp:740
|
||||
msgid "To: "
|
||||
msgstr "Kam: "
|
||||
|
||||
#: ../../../src/ui.cpp:1055
|
||||
msgid " Generating"
|
||||
msgstr " Generuojama"
|
||||
|
||||
#: ../../../src/ui.cpp:1057
|
||||
msgid "(not connected)"
|
||||
msgstr "(neprijungta)"
|
||||
|
||||
#: ../../../src/ui.cpp:1060
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d Jungtys %d Blokai %d pervedimai"
|
||||
|
||||
#: ../../../src/ui.cpp:1165
|
||||
#: ../../../src/ui.cpp:2529
|
||||
msgid "New Receiving Address"
|
||||
msgstr "Naujas priėmimo adresas"
|
||||
|
||||
#: ../../../src/ui.cpp:1166
|
||||
#: ../../../src/ui.cpp:2530
|
||||
msgid ""
|
||||
"You should use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"Naudokite naują adresas kiekvienam pervedimui.\n"
|
||||
"\n"
|
||||
"Pavadinimas"
|
||||
|
||||
#: ../../../src/ui.cpp:1235
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>Būklė:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1240
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ", dar nėra paskelbta"
|
||||
|
||||
#: ../../../src/ui.cpp:1242
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ", paskelbta per %d nodą"
|
||||
|
||||
#: ../../../src/ui.cpp:1244
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ", paskelbta per %d nodus"
|
||||
|
||||
#: ../../../src/ui.cpp:1248
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>Data:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1256
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>Iš:</b> Sugeneruota<br>"
|
||||
|
||||
#: ../../../src/ui.cpp:1262
|
||||
#: ../../../src/ui.cpp:1280
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>Nuo:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1280
|
||||
msgid "unknown"
|
||||
msgstr "nežinomas"
|
||||
|
||||
#: ../../../src/ui.cpp:1281
|
||||
#: ../../../src/ui.cpp:1305
|
||||
#: ../../../src/ui.cpp:1364
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>Kam:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1284
|
||||
msgid " (yours, label: "
|
||||
msgstr " (jūsų, pavadinimas: "
|
||||
|
||||
#: ../../../src/ui.cpp:1286
|
||||
msgid " (yours)"
|
||||
msgstr " (jūsų)"
|
||||
|
||||
#: ../../../src/ui.cpp:1323
|
||||
#: ../../../src/ui.cpp:1335
|
||||
#: ../../../src/ui.cpp:1381
|
||||
#: ../../../src/ui.cpp:1398
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr "<b>Kreditas:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1325
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s bus galima naudoti už %d blokų)"
|
||||
|
||||
#: ../../../src/ui.cpp:1327
|
||||
msgid "(not accepted)"
|
||||
msgstr "(nepriimta)"
|
||||
|
||||
#: ../../../src/ui.cpp:1372
|
||||
#: ../../../src/ui.cpp:1380
|
||||
#: ../../../src/ui.cpp:1395
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr "<b>Debetas:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1386
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>Pervedimo mokestis:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1402
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>Neto suma:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1409
|
||||
msgid "Message:"
|
||||
msgstr "Žinutė:"
|
||||
|
||||
#: ../../../src/ui.cpp:1411
|
||||
msgid "Comment:"
|
||||
msgstr "Komentaras:"
|
||||
|
||||
#: ../../../src/ui.cpp:1414
|
||||
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
|
||||
msgstr "Turite palaukti 120 blokų, kol galėsite išleisti sugeneruotas monetas. Kai sugeneravotė šį blokai, jis buvo paskelbtas tinklui ir bus pridėtas į blokų grandinę. Jei šio bloko tinklas nepriims i grandinė, jis pasikeis į \"nepriimtas\" ir negali būti išleidžiamas. Tai gali kartais nutikti jei kitas nodas sugeneravo bloką keliom sekundėm anksčiau."
|
||||
|
||||
#: ../../../src/ui.cpp:1594
|
||||
msgid "Cannot write autostart/bitcoin.desktop file"
|
||||
msgstr "Nepavyksta įrašyti į autostart/bitcoin.desktop failą"
|
||||
|
||||
#: ../../../src/ui.cpp:1630
|
||||
msgid "Main"
|
||||
msgstr "Pagrindinis"
|
||||
|
||||
#: ../../../src/ui.cpp:1638
|
||||
msgid "&Start Bitcoin on window system startup"
|
||||
msgstr "&Paleisti Bitcoin kai pasileižia operacinė sistema"
|
||||
|
||||
#: ../../../src/ui.cpp:1645
|
||||
msgid "&Minimize on close"
|
||||
msgstr "&Sumažinti kai uždaroma"
|
||||
|
||||
#: ../../../src/ui.cpp:1787
|
||||
#, c-format
|
||||
msgid "version %s"
|
||||
msgstr "versija %s"
|
||||
|
||||
#: ../../../src/ui.cpp:1899
|
||||
msgid "Error in amount "
|
||||
msgstr "Klaidinga suma"
|
||||
|
||||
#: ../../../src/ui.cpp:1899
|
||||
#: ../../../src/ui.cpp:1904
|
||||
#: ../../../src/ui.cpp:1909
|
||||
#: ../../../src/ui.cpp:1944
|
||||
#: ../../../src/uibase.cpp:55
|
||||
msgid "Send Coins"
|
||||
msgstr "Siūsti monetas"
|
||||
|
||||
#: ../../../src/ui.cpp:1904
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "Suma viršija jūsų balasą"
|
||||
|
||||
#: ../../../src/ui.cpp:1909
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "Bendra suma viršija jūsu balansą kai"
|
||||
|
||||
#: ../../../src/ui.cpp:1909
|
||||
msgid " transaction fee is included "
|
||||
msgstr "pervedimo suma įskaičiuota"
|
||||
|
||||
#: ../../../src/ui.cpp:1927
|
||||
msgid "Payment sent "
|
||||
msgstr "Mokestis išsiųstas"
|
||||
|
||||
#: ../../../src/ui.cpp:1927
|
||||
#: ../../../src/ui.cpp:1932
|
||||
#: ../../../src/ui.cpp:2076
|
||||
#: ../../../src/ui.cpp:2229
|
||||
#: ../../../src/main.cpp:3997
|
||||
msgid "Sending..."
|
||||
msgstr "Siunčia..."
|
||||
|
||||
#: ../../../src/ui.cpp:1944
|
||||
msgid "Invalid address "
|
||||
msgstr "Klaidingas adresas"
|
||||
|
||||
#: ../../../src/ui.cpp:1997
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "Siunčia %s į %s"
|
||||
|
||||
#: ../../../src/ui.cpp:2070
|
||||
#: ../../../src/ui.cpp:2103
|
||||
msgid "CANCELLED"
|
||||
msgstr "NUTRAUKTA"
|
||||
|
||||
#: ../../../src/ui.cpp:2074
|
||||
msgid "Cancelled"
|
||||
msgstr "Nutraukta"
|
||||
|
||||
#: ../../../src/ui.cpp:2076
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "Siuntimas nutrauktas"
|
||||
|
||||
#: ../../../src/ui.cpp:2129
|
||||
msgid "Error: "
|
||||
msgstr "Klaida:"
|
||||
|
||||
#: ../../../src/ui.cpp:2143
|
||||
#: ../../../src/ui.cpp:2214
|
||||
#: ../../../src/main.cpp:4016
|
||||
msgid "Insufficient funds"
|
||||
msgstr "Nepakankamai monetų"
|
||||
|
||||
#: ../../../src/ui.cpp:2148
|
||||
msgid "Connecting..."
|
||||
msgstr "Jungiasi..."
|
||||
|
||||
#: ../../../src/ui.cpp:2153
|
||||
msgid "Unable to connect"
|
||||
msgstr "Negali prisijungti"
|
||||
|
||||
#: ../../../src/ui.cpp:2158
|
||||
msgid "Requesting public key..."
|
||||
msgstr "Prašo \"viešojo rakto\"(public key)..."
|
||||
|
||||
#: ../../../src/ui.cpp:2170
|
||||
msgid "Received public key..."
|
||||
msgstr "Gautas \"viešasis raktas\"(public key)..."
|
||||
|
||||
#: ../../../src/ui.cpp:2184
|
||||
msgid "Recipient is not accepting transactions sent by IP address"
|
||||
msgstr "Gavėjas nepriima pervedimų siunčiamų iš IP adresų"
|
||||
|
||||
#: ../../../src/ui.cpp:2186
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "Persiuntimas nepriimtas"
|
||||
|
||||
#: ../../../src/ui.cpp:2195
|
||||
msgid "Invalid response received"
|
||||
msgstr "Gautas klaidingas atsakymas"
|
||||
|
||||
#: ../../../src/ui.cpp:2210
|
||||
msgid "Creating transaction..."
|
||||
msgstr "Kuriamas pervedimas..."
|
||||
|
||||
#: ../../../src/ui.cpp:2222
|
||||
#, c-format
|
||||
msgid "This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds"
|
||||
msgstr "Šis pervedimas reikalauja %s mokesčio dėl jo sumos, sudėtingumo arba dėl to, kad šie pinigai buvo neseniai gauti"
|
||||
|
||||
#: ../../../src/ui.cpp:2224
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "Pervedimo sukurti nepavyko"
|
||||
|
||||
#: ../../../src/ui.cpp:2231
|
||||
msgid "Transaction aborted"
|
||||
msgstr "Pervedimas nutrauktas"
|
||||
|
||||
#: ../../../src/ui.cpp:2239
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "Prarastas ryšys, pervedimas nutrauktas"
|
||||
|
||||
#: ../../../src/ui.cpp:2255
|
||||
msgid "Sending payment..."
|
||||
msgstr "Monetos siunčiamos..."
|
||||
|
||||
#: ../../../src/ui.cpp:2261
|
||||
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Pervedimas buvo atmestas. Tai galėjo atsitikti jei dalis jūsų monetų jau buvo išleista. Pvz.: Jei nodojote kopija wallet.dat kitame kliente ir monetos buvo išleistos ten, bet nepažymėtos kaip išleistos čia."
|
||||
|
||||
#: ../../../src/ui.cpp:2270
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "Laukia patvirtinimo..."
|
||||
|
||||
#: ../../../src/ui.cpp:2288
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"The transaction is recorded and will credit to the recipient,\n"
|
||||
"but the comment information will be blank."
|
||||
msgstr ""
|
||||
"Pervedimas išsiūstas, bet gavėjas negalėjo jo patvirtinti.\n"
|
||||
"Pervedimas įrašytas ir suma bus kredituojama gavėjui,\n"
|
||||
"bet komentaro informacija nebus rodoma."
|
||||
|
||||
#: ../../../src/ui.cpp:2297
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "Pervedimas išsiūstas, bet klaidingas atsakymas gautas"
|
||||
|
||||
#: ../../../src/ui.cpp:2303
|
||||
msgid "Payment completed"
|
||||
msgstr "Pervedimas pavyko"
|
||||
|
||||
#: ../../../src/ui.cpp:2334
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2517
|
||||
msgid "Name"
|
||||
msgstr "Vardas"
|
||||
|
||||
#: ../../../src/ui.cpp:2335
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2517
|
||||
msgid "Address"
|
||||
msgstr "Adresas"
|
||||
|
||||
#: ../../../src/ui.cpp:2337
|
||||
#: ../../../src/ui.cpp:2492
|
||||
msgid "Label"
|
||||
msgstr "Pavadinimas"
|
||||
|
||||
#: ../../../src/ui.cpp:2338
|
||||
#: ../../../src/uibase.cpp:837
|
||||
msgid "Bitcoin Address"
|
||||
msgstr "Bitcoin Adresas"
|
||||
|
||||
#: ../../../src/ui.cpp:2462
|
||||
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
|
||||
msgstr "Tai vienas iš jūsų adresų priimti pervedimams ir negali būti įvestas i adresų knygą"
|
||||
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2486
|
||||
msgid "Edit Address"
|
||||
msgstr "Pakeisti Adresą"
|
||||
|
||||
#: ../../../src/ui.cpp:2492
|
||||
msgid "Edit Address Label"
|
||||
msgstr "Pakeisti adreso pavadinimą"
|
||||
|
||||
#: ../../../src/ui.cpp:2517
|
||||
#: ../../../src/ui.cpp:2523
|
||||
msgid "Add Address"
|
||||
msgstr "Pridėti adresą"
|
||||
|
||||
#: ../../../src/ui.cpp:2600
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2602
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - Generuoja"
|
||||
|
||||
#: ../../../src/ui.cpp:2604
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (neprijungta)"
|
||||
|
||||
#: ../../../src/ui.cpp:2683
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "&Atidaryti Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2684
|
||||
#, fuzzy
|
||||
msgid "&Send Bitcoins"
|
||||
msgstr "&Atidaryti Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2685
|
||||
msgid "O&ptions..."
|
||||
msgstr "P&arametrai..."
|
||||
|
||||
#: ../../../src/ui.cpp:2688
|
||||
#: ../../../src/uibase.cpp:25
|
||||
msgid "E&xit"
|
||||
msgstr "&Išeiti"
|
||||
|
||||
#: ../../../src/ui.cpp:2904
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "Programa neveikia ir bus uždaryta"
|
||||
|
||||
#: ../../../src/main.cpp:1866
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "Perspėjimas: Diske trūksta vietos"
|
||||
|
||||
#: ../../../src/main.cpp:3990
|
||||
#, c-format
|
||||
msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "
|
||||
msgstr "Klaida: Šis pervedimas reikalauja %s mokesčio dėl jo sumos, sudėtingumo arba dėl to, kad šie pinigai buvo neseniai gauti "
|
||||
|
||||
#: ../../../src/main.cpp:3992
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "Klaida: Pervedimo sukurti nepavyko "
|
||||
|
||||
#: ../../../src/main.cpp:4001
|
||||
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Klaida: Pervedimas nepavyko. Tai galėjo atsitikti jei dalis jūsų monetų jau buvo išleista. Pvz.: Jei nodojote kopija wallet.dat kitame kliente ir monetos buvo išleistos ten, bet nepažymėtos kaip išleistos čia."
|
||||
|
||||
#: ../../../src/main.cpp:4014
|
||||
msgid "Invalid amount"
|
||||
msgstr "Neteisinga suma"
|
||||
|
||||
#: ../../../src/main.cpp:4021
|
||||
msgid "Invalid bitcoin address"
|
||||
msgstr "Klaidingas bitcoin adresas"
|
||||
|
||||
#: ../../../src/rpc.cpp:1802
|
||||
#: ../../../src/rpc.cpp:1804
|
||||
#, c-format
|
||||
msgid "To use the %s option"
|
||||
msgstr "Kad naudoti %s parametrą"
|
||||
|
||||
#: ../../../src/rpc.cpp:1806
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Warning: %s, you must set rpcpassword=<password>\n"
|
||||
"in the configuration file: %s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions.\n"
|
||||
msgstr ""
|
||||
"Perspėjimas: %s, jūs privalote nustatyti rpcpassword=<slaptažodis>\n"
|
||||
"Konfiguracijos faile: %s\n"
|
||||
"Jei failas neegzistuoja, sukurkite jį su owner-readable-only failo teisėmis.\n"
|
||||
|
||||
#: ../../../src/rpc.cpp:1974
|
||||
#, c-format
|
||||
msgid ""
|
||||
"You must set rpcpassword=<password> in the configuration file:\n"
|
||||
"%s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions."
|
||||
msgstr ""
|
||||
"Jūs privalote nustatyti rpcpassword=<slaptažodis> Konfiguracijos faile:\n"
|
||||
"%s\n"
|
||||
"Jei failas neegzistuoja, sukurkite jį su owner-readable-only failo teisėm."
|
||||
|
||||
#: ../../../src/util.cpp:866
|
||||
msgid "Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."
|
||||
msgstr "Perspėjimas: Prašome patikrinti kompiuterio laiką ir datą. Jei laikas neteisingai nustatytas, Bitcoin neveiks."
|
||||
|
||||
#: ../../../src/util.cpp:899
|
||||
msgid "beta"
|
||||
msgstr "beta"
|
||||
|
||||
#: ../../../src/uibase.cpp:28
|
||||
msgid "&File"
|
||||
msgstr "&Byla"
|
||||
|
||||
#: ../../../src/uibase.cpp:32
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "&Jūsų priimantys adresai..."
|
||||
|
||||
#: ../../../src/uibase.cpp:36
|
||||
msgid "&Options..."
|
||||
msgstr "&Parametrai"
|
||||
|
||||
#: ../../../src/uibase.cpp:39
|
||||
msgid "&Settings"
|
||||
msgstr "N&ustatymai"
|
||||
|
||||
#: ../../../src/uibase.cpp:43
|
||||
msgid "&About..."
|
||||
msgstr "&О Apie..."
|
||||
|
||||
#: ../../../src/uibase.cpp:46
|
||||
msgid "&Help"
|
||||
msgstr "&Pagalba"
|
||||
|
||||
#: ../../../src/uibase.cpp:56
|
||||
msgid "Address Book"
|
||||
msgstr "Adresų knyga"
|
||||
|
||||
#: ../../../src/uibase.cpp:69
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "Jūsų Bitcoin Adresas:"
|
||||
|
||||
#: ../../../src/uibase.cpp:76
|
||||
msgid " &New... "
|
||||
msgstr " &Naujas... "
|
||||
|
||||
#: ../../../src/uibase.cpp:79
|
||||
#: ../../../src/uibase.cpp:780
|
||||
#: ../../../src/uibase.cpp:883
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr "&Kopijuoti"
|
||||
|
||||
#: ../../../src/uibase.cpp:93
|
||||
msgid "Balance:"
|
||||
msgstr "Balansas:"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " All"
|
||||
msgstr "Visi"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Sent"
|
||||
msgstr "Išsiūsta"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Received"
|
||||
msgstr "Priimta"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " In Progress"
|
||||
msgstr "Progrese"
|
||||
|
||||
#: ../../../src/uibase.cpp:130
|
||||
msgid "All Transactions"
|
||||
msgstr "Visi pervedimai"
|
||||
|
||||
#: ../../../src/uibase.cpp:141
|
||||
msgid "Sent/Received"
|
||||
msgstr "Išsiųsti/Priimti"
|
||||
|
||||
#: ../../../src/uibase.cpp:152
|
||||
msgid "Sent"
|
||||
msgstr "Išsiūsti"
|
||||
|
||||
#: ../../../src/uibase.cpp:163
|
||||
msgid "Received"
|
||||
msgstr "Priimti"
|
||||
|
||||
#: ../../../src/uibase.cpp:302
|
||||
#: ../../../src/uibase.cpp:443
|
||||
#: ../../../src/uibase.cpp:542
|
||||
#: ../../../src/uibase.cpp:722
|
||||
#: ../../../src/uibase.cpp:783
|
||||
#: ../../../src/uibase.cpp:892
|
||||
#: ../../../src/uibase.cpp:981
|
||||
msgid "OK"
|
||||
msgstr "Gerai"
|
||||
|
||||
#: ../../../src/uibase.cpp:345
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
msgstr "&Paleisti Bitcoin kai pasileidžia operacinė sistema"
|
||||
|
||||
#: ../../../src/uibase.cpp:348
|
||||
msgid "&Minimize to the tray instead of the taskbar"
|
||||
msgstr "&Sumažinti į \"tray\" vietoj \"taskbar\""
|
||||
|
||||
#: ../../../src/uibase.cpp:351
|
||||
msgid "Map port using &UPnP"
|
||||
msgstr "Peradresuoti porta naudojant &UPnP"
|
||||
|
||||
#: ../../../src/uibase.cpp:354
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "Su&mažinti į \"tray\" kai uždaroma"
|
||||
|
||||
#: ../../../src/uibase.cpp:360
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "&Prisijungti per socks4 proksį: "
|
||||
|
||||
#: ../../../src/uibase.cpp:371
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "P&roksio IP:"
|
||||
|
||||
#: ../../../src/uibase.cpp:379
|
||||
msgid " &Port:"
|
||||
msgstr " &Portas"
|
||||
|
||||
#: ../../../src/uibase.cpp:392
|
||||
msgid "Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."
|
||||
msgstr "Pasirintinis pervedimo mokestis per KB, kuris padeda jį ivykdyti greičiau. Dauguma pervedimų yra 1KB. Rekomencuojamas mokestis 0.01."
|
||||
|
||||
#: ../../../src/uibase.cpp:399
|
||||
#, fuzzy
|
||||
msgid "Pay transaction fee:"
|
||||
msgstr "Pervedimo mokestis:"
|
||||
|
||||
#: ../../../src/uibase.cpp:420
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:424
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:446
|
||||
#: ../../../src/uibase.cpp:668
|
||||
#: ../../../src/uibase.cpp:727
|
||||
#: ../../../src/uibase.cpp:786
|
||||
#: ../../../src/uibase.cpp:895
|
||||
#: ../../../src/uibase.cpp:984
|
||||
msgid "Cancel"
|
||||
msgstr "Nutraukti"
|
||||
|
||||
#: ../../../src/uibase.cpp:449
|
||||
msgid "&Apply"
|
||||
msgstr "&Nustatyti"
|
||||
|
||||
#: ../../../src/uibase.cpp:508
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin "
|
||||
|
||||
#: ../../../src/uibase.cpp:514
|
||||
msgid "version"
|
||||
msgstr "versija"
|
||||
|
||||
#: ../../../src/uibase.cpp:525
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"Autorinė teisė (c) 2009-2010 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"Ši programa yra eksperimentinė.\n"
|
||||
"\n"
|
||||
"Išleista ir teisės saugomos pagal MIT/X11 programų licenziją, kuri detaliau aprašyra faile \n"
|
||||
"license.txt ir http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"Šis produktas turi programą iš OpenSSL projekto, kuri naudojamas \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/), kriptografinę programą parašyta \n"
|
||||
"Eric Young (eay@cryptsoft.com) ir UPnP programą parašyta Thomas Bernard."
|
||||
|
||||
#: ../../../src/uibase.cpp:581
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
msgstr "Įveskite Bitcoin adresą (pvz.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
|
||||
#: ../../../src/uibase.cpp:595
|
||||
msgid "Pay &To:"
|
||||
msgstr "&Kam:"
|
||||
|
||||
#: ../../../src/uibase.cpp:610
|
||||
msgid "&Paste"
|
||||
msgstr "&Įrašyti"
|
||||
|
||||
#: ../../../src/uibase.cpp:613
|
||||
msgid " Address &Book..."
|
||||
msgstr " &Adresų knyga..."
|
||||
|
||||
#: ../../../src/uibase.cpp:620
|
||||
msgid "&Amount:"
|
||||
msgstr "S&uma:"
|
||||
|
||||
#: ../../../src/uibase.cpp:630
|
||||
msgid "T&ransfer:"
|
||||
msgstr "&Pervedimas:"
|
||||
|
||||
#: ../../../src/uibase.cpp:636
|
||||
msgid " Standard"
|
||||
msgstr "Standartinis"
|
||||
|
||||
#: ../../../src/uibase.cpp:663
|
||||
msgid "&Send"
|
||||
msgstr "&Siūsti"
|
||||
|
||||
#: ../../../src/uibase.cpp:711
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Jungiasi..."
|
||||
|
||||
#: ../../../src/uibase.cpp:761
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
|
||||
msgstr "Tai yra jūsų Bitcoin adresai priimti pervedimus. Galite duoti skirtinga adresa kiekvienam siuntėjui, kad žinotumėte kas jums moka. Pažymėtas adresas bus rodomas pagrindiniame lange."
|
||||
|
||||
#: ../../../src/uibase.cpp:774
|
||||
#: ../../../src/uibase.cpp:886
|
||||
msgid "&Edit..."
|
||||
msgstr "&Pakeisti..."
|
||||
|
||||
#: ../../../src/uibase.cpp:777
|
||||
#: ../../../src/uibase.cpp:889
|
||||
msgid " &New Address... "
|
||||
msgstr " &Naujas Adresas... "
|
||||
|
||||
#: ../../../src/uibase.cpp:849
|
||||
msgid "Sending"
|
||||
msgstr "Siunčiama"
|
||||
|
||||
#: ../../../src/uibase.cpp:857
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
|
||||
msgstr "Tai yra jūsų Bitcoin adresai priimti pervedimus. Galite duoti skirtinga adresa kiekvienam siuntėjui, kad žinotumėte kas jums moka. Pažymėtas adresas bus rodomas pagrindiniame lange."
|
||||
|
||||
#: ../../../src/uibase.cpp:870
|
||||
msgid "Receiving"
|
||||
msgstr "Priėmimo"
|
||||
|
||||
#: ../../../src/uibase.cpp:880
|
||||
msgid "&Delete"
|
||||
msgstr "&Ištrinti"
|
||||
|
||||
#: ../../../src/init.cpp:142
|
||||
msgid "Bitcoin version"
|
||||
msgstr "Bitcoin version"
|
||||
|
||||
#: ../../../src/init.cpp:143
|
||||
msgid "Usage:"
|
||||
msgstr "Komandų vartojimas:"
|
||||
|
||||
#: ../../../src/init.cpp:145
|
||||
msgid "Send command to -server or bitcoind\n"
|
||||
msgstr "Siūsti komandą i -server arba bitcoind\n"
|
||||
|
||||
#: ../../../src/init.cpp:146
|
||||
msgid "List commands\n"
|
||||
msgstr "Parodyti visas komandas\n"
|
||||
|
||||
#: ../../../src/init.cpp:147
|
||||
msgid "Get help for a command\n"
|
||||
msgstr "Komandos paaiškinimas\n"
|
||||
|
||||
#: ../../../src/init.cpp:148
|
||||
msgid "Options:\n"
|
||||
msgstr "Parametrai\n"
|
||||
|
||||
#: ../../../src/init.cpp:149
|
||||
msgid "Specify configuration file (default: bitcoin.conf)\n"
|
||||
msgstr "Nurodyti konfiguracijos failą (pagal nutylėjimą: bitcoin.conf)\n"
|
||||
|
||||
#: ../../../src/init.cpp:150
|
||||
#, fuzzy
|
||||
msgid "Specify pid file (default: bitcoind.pid)\n"
|
||||
msgstr "Nurodyti konfiguracijos failą (pagal nutylėjimą: bitcoin.conf)\n"
|
||||
|
||||
#: ../../../src/init.cpp:151
|
||||
msgid "Generate coins\n"
|
||||
msgstr "Generuoti monetas\n"
|
||||
|
||||
#: ../../../src/init.cpp:152
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "Negeneruoti monetų\n"
|
||||
|
||||
#: ../../../src/init.cpp:153
|
||||
msgid "Start minimized\n"
|
||||
msgstr "Paleisti minimizuotą klientą\n"
|
||||
|
||||
#: ../../../src/init.cpp:154
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "Nurodyti duomenų direktoriją\n"
|
||||
|
||||
#: ../../../src/init.cpp:155
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
msgstr "Prisijungti per socks4 proksį\n"
|
||||
|
||||
#: ../../../src/init.cpp:156
|
||||
msgid "Allow DNS lookups for addnode and connect\n"
|
||||
msgstr "Leisti DNS lookups addnode ir connect komandoms\n"
|
||||
|
||||
#: ../../../src/init.cpp:157
|
||||
msgid "Add a node to connect to\n"
|
||||
msgstr "Pridėti nodą prie kurio bus jungiamasi\n"
|
||||
|
||||
#: ../../../src/init.cpp:158
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "Prisijungti tik prie šio nodo\n"
|
||||
|
||||
#: ../../../src/init.cpp:159
|
||||
msgid "Don't accept connections from outside\n"
|
||||
msgstr "Neleisti prisijungti iš išorės\n"
|
||||
|
||||
#: ../../../src/init.cpp:162
|
||||
msgid "Don't attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Nenaudoti UPnP klausančio porto peradresavimui\n"
|
||||
|
||||
#: ../../../src/init.cpp:164
|
||||
msgid "Attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Pamėginti naudoti UPnP klausančio porto peradresavimui\n"
|
||||
|
||||
#: ../../../src/init.cpp:167
|
||||
msgid "Fee per KB to add to transactions you send\n"
|
||||
msgstr "Mokestis per KB pridedamas prie siunčiamo pervedimo\n"
|
||||
|
||||
#: ../../../src/init.cpp:169
|
||||
msgid "Accept command line and JSON-RPC commands\n"
|
||||
msgstr "Priimti komandas iš terminalo ir JSON-RPC\n"
|
||||
|
||||
#: ../../../src/init.cpp:172
|
||||
msgid "Run in the background as a daemon and accept commands\n"
|
||||
msgstr "Paleisti daemon\n"
|
||||
|
||||
#: ../../../src/init.cpp:174
|
||||
msgid "Use the test network\n"
|
||||
msgstr "Naudoti bandomajį tinklą\n"
|
||||
|
||||
#: ../../../src/init.cpp:175
|
||||
msgid "Username for JSON-RPC connections\n"
|
||||
msgstr "Naudotojo vardas JSON-RPC prisijungimui\n"
|
||||
|
||||
#: ../../../src/init.cpp:176
|
||||
msgid "Password for JSON-RPC connections\n"
|
||||
msgstr "Slaptažodis JSON-RPC prisijungimui\n"
|
||||
|
||||
#: ../../../src/init.cpp:177
|
||||
msgid "Listen for JSON-RPC connections on <port> (default: 8332)\n"
|
||||
msgstr "Klausyti JSON-RPC prisijungimų ant <port> (pagal nutylėjimą: 8332)\n"
|
||||
|
||||
#: ../../../src/init.cpp:178
|
||||
msgid "Allow JSON-RPC connections from specified IP address\n"
|
||||
msgstr "Leisti JSON-RPC prisijungimą iš tam tikrų IP adresų\n"
|
||||
|
||||
#: ../../../src/init.cpp:179
|
||||
msgid "Send commands to node running on <ip> (default: 127.0.0.1)\n"
|
||||
msgstr "Siūsti komandas į nodą kuris yra <ip> (pagal nutylėjimą: 127.0.0.1)\n"
|
||||
|
||||
#: ../../../src/init.cpp:180
|
||||
msgid "Set key pool size to <n> (default: 100)\n"
|
||||
msgstr "Nustatyti kiek raktų skaičių <n> (pagal nutylėjimą: 100)\n"
|
||||
|
||||
#: ../../../src/init.cpp:181
|
||||
msgid "Rescan the block chain for missing wallet transactions\n"
|
||||
msgstr "Perskanuoti blokų grandinę dėl trūkstamų pervedimų\n"
|
||||
|
||||
#: ../../../src/init.cpp:185
|
||||
msgid ""
|
||||
"\n"
|
||||
"SSL options: (see the Bitcoin Wiki for SSL setup instructions)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"SSL parametrai: (aplankykite Bitcoin Wiki dėl SSL nustatymų)\n"
|
||||
|
||||
#: ../../../src/init.cpp:186
|
||||
msgid "Use OpenSSL (https) for JSON-RPC connections\n"
|
||||
msgstr "Naudoti OpenSSL (https) JSON-RPC prisijungimui\n"
|
||||
|
||||
#: ../../../src/init.cpp:187
|
||||
msgid "Server certificate file (default: server.cert)\n"
|
||||
msgstr "Serverio sertifikato failas (pagal nutylėjimą: server.cert)\n"
|
||||
|
||||
#: ../../../src/init.cpp:188
|
||||
msgid "Server private key (default: server.pem)\n"
|
||||
msgstr "Serverio privatus raktas (pagal nutylėjimą: server.pem)\n"
|
||||
|
||||
#: ../../../src/init.cpp:189
|
||||
msgid "Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
msgstr "Priimtinas šifras (pagal nutylėjimą: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
|
||||
#: ../../../src/init.cpp:193
|
||||
msgid "This help message\n"
|
||||
msgstr "Ši pagalbos žinutė\n"
|
||||
|
||||
#: ../../../src/init.cpp:330
|
||||
#, c-format
|
||||
msgid "Cannot obtain a lock on data directory %s. Bitcoin is probably already running."
|
||||
msgstr "Neranda duomenų directorijos %s. Bitcoin programa tikriausiai jau paleista."
|
||||
|
||||
#: ../../../src/init.cpp:356
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "Klaida nuskaitant addr.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:362
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "Klaida nuskaitant blkindex.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:369
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "Klaida nuskaitant wallet.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:449
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "Klaidingas -proxy adresas"
|
||||
|
||||
#: ../../../src/init.cpp:472
|
||||
msgid "Invalid amount for -paytxfee=<amount>"
|
||||
msgstr "Klaidinga suma -paytxfee=<amount>"
|
||||
|
||||
#: ../../../src/init.cpp:476
|
||||
msgid "Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."
|
||||
msgstr "Perspėjimas: -paytxfee yra nustatyta labai aukšta suma. Ši suma bus nuskaičiuota kaip mokestis darant pervedimą"
|
||||
|
||||
#: ../../../src/uibase.h:147
|
||||
msgid "Transaction Details"
|
||||
msgstr "Pervedimų detalės"
|
||||
|
||||
#: ../../../src/uibase.h:199
|
||||
msgid "Options"
|
||||
msgstr "Parametrai"
|
||||
|
||||
#: ../../../src/uibase.h:228
|
||||
msgid "About Bitcoin"
|
||||
msgstr "Apie Bitcoin"
|
||||
|
||||
#: ../../../src/uibase.h:337
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "Jūsų Bitcoin Adresas"
|
||||
976
locale/pl/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,976 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Bitcoin\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-06-28 20:11+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Dawid Spiechowicz <spiechu@gmail.com>\n"
|
||||
"Language-Team: Spiechu <spiechu@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: \n"
|
||||
"X-Poedit-Language: Polish\n"
|
||||
"X-Poedit-Country: POLAND\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../src/net.cpp:1590
|
||||
#, c-format
|
||||
msgid "Unable to bind to port %d on this computer. Bitcoin is probably already running."
|
||||
msgstr "Nie można powiązać z portem %d tego komputera. Prawdopodobnie program Bitcoin jest już uruchomiony."
|
||||
|
||||
#: ../../../src/init.cpp:162
|
||||
msgid "Bitcoin version"
|
||||
msgstr "Wersja Bitcoin"
|
||||
|
||||
#: ../../../src/init.cpp:163
|
||||
msgid "Usage:"
|
||||
msgstr "Użycie:"
|
||||
|
||||
#: ../../../src/init.cpp:165
|
||||
msgid "Send command to -server or bitcoind\n"
|
||||
msgstr "Wyślij polecenie do -server lub bitcoind\n"
|
||||
|
||||
#: ../../../src/init.cpp:166
|
||||
msgid "List commands\n"
|
||||
msgstr "Wyświetl komendy\n"
|
||||
|
||||
#: ../../../src/init.cpp:167
|
||||
msgid "Get help for a command\n"
|
||||
msgstr "Wyświetl pomoc dla komendy\n"
|
||||
|
||||
#: ../../../src/init.cpp:168
|
||||
msgid "Options:\n"
|
||||
msgstr "Opcje:\n"
|
||||
|
||||
#: ../../../src/init.cpp:169
|
||||
msgid "Specify configuration file (default: bitcoin.conf)\n"
|
||||
msgstr "Określ plik konfiguracyjny (domyślnie: bitcoin.conf)\n"
|
||||
|
||||
#: ../../../src/init.cpp:170
|
||||
msgid "Specify pid file (default: bitcoind.pid)\n"
|
||||
msgstr "Wybierz plik pid (domyślnie: bitcoind.pid)\n"
|
||||
|
||||
#: ../../../src/init.cpp:171
|
||||
msgid "Generate coins\n"
|
||||
msgstr "Generuj monety\n"
|
||||
|
||||
#: ../../../src/init.cpp:172
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "Nie generuj monet\n"
|
||||
|
||||
#: ../../../src/init.cpp:173
|
||||
msgid "Start minimized\n"
|
||||
msgstr "Uruchom zminimalizowany\n"
|
||||
|
||||
#: ../../../src/init.cpp:174
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "Wybierz katalog z danymi\n"
|
||||
|
||||
#: ../../../src/init.cpp:175
|
||||
msgid "Specify connection timeout (in milliseconds)\n"
|
||||
msgstr "Ustaw czas upływu połączenia (w milisekundach)\n"
|
||||
|
||||
#: ../../../src/init.cpp:176
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
msgstr "Połącz przez socks4 proxy\n"
|
||||
|
||||
#: ../../../src/init.cpp:177
|
||||
msgid "Allow DNS lookups for addnode and connect\n"
|
||||
msgstr "Umożliwiaj wyszukiwanie DNS dla dodania węzła i połączenia\n"
|
||||
|
||||
#: ../../../src/init.cpp:178
|
||||
msgid "Add a node to connect to\n"
|
||||
msgstr "Dodaj węzeł do którego połączyć\n"
|
||||
|
||||
#: ../../../src/init.cpp:179
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "Łącz tylko z wybranym węzłem\n"
|
||||
|
||||
#: ../../../src/init.cpp:180
|
||||
msgid "Don't accept connections from outside\n"
|
||||
msgstr "Nie akceptuj połączeń z zewnątrz\n"
|
||||
|
||||
#: ../../../src/init.cpp:183
|
||||
msgid "Don't attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Nie próbuj użyć UPnP dla mapowania portu nasłuchu\n"
|
||||
|
||||
#: ../../../src/init.cpp:185
|
||||
msgid "Attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Próbuj użyć UPnP dla mapowania portu nasłuchu\n"
|
||||
|
||||
#: ../../../src/init.cpp:188
|
||||
msgid "Fee per KB to add to transactions you send\n"
|
||||
msgstr "Prowizja na KB dodawana do transakcji, które wysyłasz\n"
|
||||
|
||||
#: ../../../src/init.cpp:190
|
||||
msgid "Accept command line and JSON-RPC commands\n"
|
||||
msgstr "Akceptuj polecenia linii poleceń i JSON-RPC\n"
|
||||
|
||||
#: ../../../src/init.cpp:193
|
||||
msgid "Run in the background as a daemon and accept commands\n"
|
||||
msgstr "Uruchom w tle (daemon) i akceptuj komendy\n"
|
||||
|
||||
#: ../../../src/init.cpp:195
|
||||
msgid "Use the test network\n"
|
||||
msgstr "Użyj sieci testowej\n"
|
||||
|
||||
#: ../../../src/init.cpp:196
|
||||
msgid "Username for JSON-RPC connections\n"
|
||||
msgstr "Nazwa użytkownika dla połączeń JSON-RPC\n"
|
||||
|
||||
#: ../../../src/init.cpp:197
|
||||
msgid "Password for JSON-RPC connections\n"
|
||||
msgstr "Hasło dla połączeń JSON-RPC\n"
|
||||
|
||||
#: ../../../src/init.cpp:198
|
||||
msgid "Listen for JSON-RPC connections on <port> (default: 8332)\n"
|
||||
msgstr "Nasłuch dla połączeń JSON-RPC na porcie <port> (domyślnie: 8332)\n"
|
||||
|
||||
#: ../../../src/init.cpp:199
|
||||
msgid "Allow JSON-RPC connections from specified IP address\n"
|
||||
msgstr "Zezwól na połączenia JSON-RPC z adresu IP\n"
|
||||
|
||||
#: ../../../src/init.cpp:200
|
||||
msgid "Send commands to node running on <ip> (default: 127.0.0.1)\n"
|
||||
msgstr "Wysyłaj polecenia do węzła działającego na <ip> (domyślnie: 127.0.0.1)\n"
|
||||
|
||||
#: ../../../src/init.cpp:201
|
||||
msgid "Set key pool size to <n> (default: 100)\n"
|
||||
msgstr "Ustaw pulę kluczy na <n> (domyślnie: 100)\n"
|
||||
|
||||
#: ../../../src/init.cpp:202
|
||||
msgid "Rescan the block chain for missing wallet transactions\n"
|
||||
msgstr "Przeszukaj łańcuch bloków w poszukiwaniu zaginionych transakcji\n"
|
||||
|
||||
#: ../../../src/init.cpp:206
|
||||
msgid ""
|
||||
"\n"
|
||||
"SSL options: (see the Bitcoin Wiki for SSL setup instructions)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Opcje SSL: (zobacz instrukcje na Bitcoin Wiki dla ustawień SSL)\n"
|
||||
|
||||
#: ../../../src/init.cpp:207
|
||||
msgid "Use OpenSSL (https) for JSON-RPC connections\n"
|
||||
msgstr "Użyj OpenSSL (https) dla połączeń JSON-RPC\n"
|
||||
|
||||
#: ../../../src/init.cpp:208
|
||||
msgid "Server certificate file (default: server.cert)\n"
|
||||
msgstr "Plik certyfikacji serwera (domyślnie: server.cert)\n"
|
||||
|
||||
#: ../../../src/init.cpp:209
|
||||
msgid "Server private key (default: server.pem)\n"
|
||||
msgstr "Klucz prywatny serwera (domyślnie: server.pem)\n"
|
||||
|
||||
#: ../../../src/init.cpp:210
|
||||
msgid "Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
msgstr "Akceptowalne szyfry (domyślnie: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
|
||||
#: ../../../src/init.cpp:214
|
||||
msgid "This help message\n"
|
||||
msgstr "Ta wiadomość pomocy\n"
|
||||
|
||||
#: ../../../src/init.cpp:351
|
||||
#, c-format
|
||||
msgid "Cannot obtain a lock on data directory %s. Bitcoin is probably already running."
|
||||
msgstr "Nie można korzystać z katalogu %s z danymi. Bitcoin prawdopodobnie już jest uruchomiony."
|
||||
|
||||
#: ../../../src/init.cpp:377
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "Błąd ładowania addr.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:383
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "Błąd ładowania blkindex.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:391
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "Błąd ładowania wallet.dat \n"
|
||||
|
||||
#: ../../../src/init.cpp:481
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "Niewłaściwy adres -proxy"
|
||||
|
||||
#: ../../../src/init.cpp:504
|
||||
msgid "Invalid amount for -paytxfee=<amount>"
|
||||
msgstr "Nieprawidłowa kwota w -paytxfee=<amount>"
|
||||
|
||||
#: ../../../src/init.cpp:508
|
||||
msgid "Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."
|
||||
msgstr "Ostrzeżenie: ustawienie -paytxfee jest bardzo wysokie. To jest prowizja transakcji, którą zapłacisz jeżeli wyślesz transakcję."
|
||||
|
||||
#: ../../../src/rpc.cpp:1822
|
||||
#: ../../../src/rpc.cpp:1824
|
||||
#, c-format
|
||||
msgid "To use the %s option"
|
||||
msgstr "Użycie opcji %s"
|
||||
|
||||
#: ../../../src/rpc.cpp:1826
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Warning: %s, you must set rpcpassword=<password>\n"
|
||||
"in the configuration file: %s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions.\n"
|
||||
msgstr ""
|
||||
"Ostrzeżenie: %s, musisz ustawić rpcpassword=<password>\n"
|
||||
"w pliku konfiguracyjnym: %s\n"
|
||||
"Jeżeli plik nie istnieje, utwórz go z uprawnieniami tylko do odczytu dla właściciela.\n"
|
||||
|
||||
#: ../../../src/rpc.cpp:1994
|
||||
#, c-format
|
||||
msgid ""
|
||||
"You must set rpcpassword=<password> in the configuration file:\n"
|
||||
"%s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions."
|
||||
msgstr ""
|
||||
"Musisz ustawić rpcpassword=<password> w pliku konfiguracyjnym:\n"
|
||||
"%s\n"
|
||||
"Jeżeli plik nie istnieje, utwórz go z uprawnieniami tylko do odczytu dla właściciela."
|
||||
|
||||
#: ../../../src/util.cpp:874
|
||||
msgid "Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."
|
||||
msgstr "Ostrzeżenie: Sprawdź czy ustawienia daty i czasu komputera są prawidłowe. Jeżeli zegar jest źle ustawiony, Bitcoin nie będzie poprawnie działał."
|
||||
|
||||
#: ../../../src/util.cpp:908
|
||||
msgid "beta"
|
||||
msgstr "beta"
|
||||
|
||||
#: ../../../src/ui.cpp:216
|
||||
#, c-format
|
||||
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
|
||||
msgstr "Ta transakcja jest poza limitem wielkości. W dalszym ciągu możesz wysłać ją z prowizją %s, która dotrze do węzłów przetwarzających twoją transakcję i pomoże utrzymać sieć. Chcesz zapłacić prowizję?"
|
||||
|
||||
#: ../../../src/ui.cpp:316
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
#: ../../../src/ui.cpp:317
|
||||
msgid "Date"
|
||||
msgstr "Data"
|
||||
|
||||
#: ../../../src/ui.cpp:318
|
||||
msgid "Description"
|
||||
msgstr "Opis"
|
||||
|
||||
#: ../../../src/ui.cpp:319
|
||||
msgid "Debit"
|
||||
msgstr "Obciążenie"
|
||||
|
||||
#: ../../../src/ui.cpp:320
|
||||
msgid "Credit"
|
||||
msgstr "Suma"
|
||||
|
||||
#: ../../../src/ui.cpp:526
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "Otwórz na %d bloków"
|
||||
|
||||
#: ../../../src/ui.cpp:528
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "Otwarte dopóki %s"
|
||||
|
||||
#: ../../../src/ui.cpp:534
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/offline?"
|
||||
|
||||
#: ../../../src/ui.cpp:536
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/niepotwierdzono"
|
||||
|
||||
#: ../../../src/ui.cpp:538
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d potwierdzeń"
|
||||
|
||||
#: ../../../src/ui.cpp:623
|
||||
msgid "Generated"
|
||||
msgstr "Wygenerowano"
|
||||
|
||||
#: ../../../src/ui.cpp:631
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "Wygenerowano (%s dojrzałych w %d więcej bloków)"
|
||||
|
||||
#: ../../../src/ui.cpp:635
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "Wygenerowano - Ostrzeżenie: Ten blok nie został otrzymany przez żaden inny węzeł i prawdopodobnie nie zostanie zaakceptowany!"
|
||||
|
||||
#: ../../../src/ui.cpp:639
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "Wygenerowano (nie zaakceptowano)"
|
||||
|
||||
#: ../../../src/ui.cpp:649
|
||||
msgid "From: "
|
||||
msgstr "Od:"
|
||||
|
||||
#: ../../../src/ui.cpp:673
|
||||
msgid "Received with: "
|
||||
msgstr "Otrzymano z:"
|
||||
|
||||
#: ../../../src/ui.cpp:719
|
||||
msgid "Payment to yourself"
|
||||
msgstr "Płatność dla siebie samego"
|
||||
|
||||
#: ../../../src/ui.cpp:753
|
||||
msgid "To: "
|
||||
msgstr "Do:"
|
||||
|
||||
#: ../../../src/ui.cpp:1068
|
||||
msgid " Generating"
|
||||
msgstr " Generowanie"
|
||||
|
||||
#: ../../../src/ui.cpp:1070
|
||||
msgid "(not connected)"
|
||||
msgstr "(nie połączony)"
|
||||
|
||||
#: ../../../src/ui.cpp:1073
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d połączeń %d bloków %d transakcji"
|
||||
|
||||
#: ../../../src/ui.cpp:1178
|
||||
#: ../../../src/ui.cpp:2571
|
||||
msgid "New Receiving Address"
|
||||
msgstr "Nowy Adres Odbiorczy"
|
||||
|
||||
#: ../../../src/ui.cpp:1179
|
||||
#: ../../../src/ui.cpp:2572
|
||||
msgid ""
|
||||
"You should use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"Powinieneś użyć nowego adresu dla każdej płatności, którą otrzymasz.\n"
|
||||
"\n"
|
||||
"Etykieta"
|
||||
|
||||
#: ../../../src/ui.cpp:1251
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>Status:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1256
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ", nie został jeszcze prawidłowo rozgłoszony"
|
||||
|
||||
#: ../../../src/ui.cpp:1258
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ", rozgłasza przez %d węzeł"
|
||||
|
||||
#: ../../../src/ui.cpp:1260
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ", rozgłasza przez %d węzłów"
|
||||
|
||||
#: ../../../src/ui.cpp:1264
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>Data:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1272
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>Źródło:</b> Wygenerowano<br>"
|
||||
|
||||
#: ../../../src/ui.cpp:1278
|
||||
#: ../../../src/ui.cpp:1296
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>Od:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1296
|
||||
msgid "unknown"
|
||||
msgstr "nieznany"
|
||||
|
||||
#: ../../../src/ui.cpp:1297
|
||||
#: ../../../src/ui.cpp:1321
|
||||
#: ../../../src/ui.cpp:1380
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>Do:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1300
|
||||
msgid " (yours, label: "
|
||||
msgstr " (twoja, etykieta: "
|
||||
|
||||
#: ../../../src/ui.cpp:1302
|
||||
msgid " (yours)"
|
||||
msgstr " (twoja)"
|
||||
|
||||
#: ../../../src/ui.cpp:1339
|
||||
#: ../../../src/ui.cpp:1351
|
||||
#: ../../../src/ui.cpp:1397
|
||||
#: ../../../src/ui.cpp:1414
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr "<b>Suma:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1341
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s dojrzałych w %d więcej bloków)"
|
||||
|
||||
#: ../../../src/ui.cpp:1343
|
||||
msgid "(not accepted)"
|
||||
msgstr "(nie zaakceptowano)"
|
||||
|
||||
#: ../../../src/ui.cpp:1388
|
||||
#: ../../../src/ui.cpp:1396
|
||||
#: ../../../src/ui.cpp:1411
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr "<b>Obciążenie:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1402
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>Prowizja transakcji:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1418
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>Kwota netto:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1425
|
||||
msgid "Message:"
|
||||
msgstr "Wiadomość:"
|
||||
|
||||
#: ../../../src/ui.cpp:1427
|
||||
msgid "Comment:"
|
||||
msgstr "Komentarz:"
|
||||
|
||||
#: ../../../src/ui.cpp:1430
|
||||
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
|
||||
msgstr "Wygenerowane monety muszą poczekać 120 bloków zanim mogą zostać wydane. Gdy wygenerowałeś ten blok, został rozgłoszony do sieci z przeznaczeniem do dodania do łańcucha bloków. Jeżeli nie uda się dodać bloku do łańcucha, zostanie oznaczony jako \"nie zaakceptowany\" i nie będzie mógł zostać wydany. Sporadycznie dzieje się tak jeżeli inny węzeł wygeneruje blok nie dalej niż kilka sekund od ciebie."
|
||||
|
||||
#: ../../../src/ui.cpp:1610
|
||||
msgid "Cannot write autostart/bitcoin.desktop file"
|
||||
msgstr "Nie mogę zapisać pliku autostart/bitcoin.desktop"
|
||||
|
||||
#: ../../../src/ui.cpp:1646
|
||||
msgid "Main"
|
||||
msgstr "Główne"
|
||||
|
||||
#: ../../../src/ui.cpp:1656
|
||||
msgid "&Start Bitcoin on window system startup"
|
||||
msgstr "&Uruchom Bitcoin przy starcie systemu"
|
||||
|
||||
#: ../../../src/ui.cpp:1663
|
||||
msgid "&Minimize on close"
|
||||
msgstr "&Minimalizuj przy zamknięciu"
|
||||
|
||||
#: ../../../src/ui.cpp:1805
|
||||
#, c-format
|
||||
msgid "version %s"
|
||||
msgstr "wersja %s"
|
||||
|
||||
#: ../../../src/ui.cpp:1928
|
||||
msgid "Error in amount "
|
||||
msgstr "Nieprawidłowa kwota"
|
||||
|
||||
#: ../../../src/ui.cpp:1928
|
||||
#: ../../../src/ui.cpp:1933
|
||||
#: ../../../src/ui.cpp:1938
|
||||
#: ../../../src/ui.cpp:1973
|
||||
#: ../../../src/uibase.cpp:55
|
||||
msgid "Send Coins"
|
||||
msgstr "Wyślij Monety"
|
||||
|
||||
#: ../../../src/ui.cpp:1933
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "Kwota przekracza twój stan konta"
|
||||
|
||||
#: ../../../src/ui.cpp:1938
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "Przekroczenie twojego stanu konta gdy"
|
||||
|
||||
#: ../../../src/ui.cpp:1938
|
||||
msgid " transaction fee is included "
|
||||
msgstr " prowizja jest wliczona"
|
||||
|
||||
#: ../../../src/ui.cpp:1956
|
||||
msgid "Payment sent "
|
||||
msgstr "Wysłano płatność"
|
||||
|
||||
#: ../../../src/ui.cpp:1956
|
||||
#: ../../../src/ui.cpp:1961
|
||||
#: ../../../src/ui.cpp:2107
|
||||
#: ../../../src/ui.cpp:2260
|
||||
#: ../../../src/wallet.cpp:924
|
||||
msgid "Sending..."
|
||||
msgstr "Wysyłanie..."
|
||||
|
||||
#: ../../../src/ui.cpp:1973
|
||||
msgid "Invalid address "
|
||||
msgstr "Nieprawidłowy adres"
|
||||
|
||||
#: ../../../src/ui.cpp:2028
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "Wysyłanie %s do %s"
|
||||
|
||||
#: ../../../src/ui.cpp:2101
|
||||
#: ../../../src/ui.cpp:2134
|
||||
msgid "CANCELLED"
|
||||
msgstr "ANULOWANO"
|
||||
|
||||
#: ../../../src/ui.cpp:2105
|
||||
msgid "Cancelled"
|
||||
msgstr "Anulowano"
|
||||
|
||||
#: ../../../src/ui.cpp:2107
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "Transfer anulowano"
|
||||
|
||||
#: ../../../src/ui.cpp:2160
|
||||
msgid "Error: "
|
||||
msgstr "Błąd:"
|
||||
|
||||
#: ../../../src/ui.cpp:2174
|
||||
#: ../../../src/ui.cpp:2245
|
||||
#: ../../../src/wallet.cpp:943
|
||||
msgid "Insufficient funds"
|
||||
msgstr "Niewystarczające fundusze"
|
||||
|
||||
#: ../../../src/ui.cpp:2179
|
||||
msgid "Connecting..."
|
||||
msgstr "Łączenie..."
|
||||
|
||||
#: ../../../src/ui.cpp:2184
|
||||
msgid "Unable to connect"
|
||||
msgstr "Nie można połączyć"
|
||||
|
||||
#: ../../../src/ui.cpp:2189
|
||||
msgid "Requesting public key..."
|
||||
msgstr "Żądanie klucza publicznego..."
|
||||
|
||||
#: ../../../src/ui.cpp:2201
|
||||
msgid "Received public key..."
|
||||
msgstr "Otrzymano klucz publiczny..."
|
||||
|
||||
#: ../../../src/ui.cpp:2215
|
||||
msgid "Recipient is not accepting transactions sent by IP address"
|
||||
msgstr "Adresat nie akceptuje transakcji wysyłanych przez adres IP"
|
||||
|
||||
#: ../../../src/ui.cpp:2217
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "Transfer nie został zaakceptowany"
|
||||
|
||||
#: ../../../src/ui.cpp:2226
|
||||
msgid "Invalid response received"
|
||||
msgstr "Otrzymano niepoprawną odpowiedź"
|
||||
|
||||
#: ../../../src/ui.cpp:2241
|
||||
msgid "Creating transaction..."
|
||||
msgstr "Tworzenie transakcji..."
|
||||
|
||||
#: ../../../src/ui.cpp:2253
|
||||
#, c-format
|
||||
msgid "This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds"
|
||||
msgstr "Ta transakcja wymaga prowizji co najmniej %s z uwagi na kwotę, złożoność lub użycie niedawno otrzymanych funduszy"
|
||||
|
||||
#: ../../../src/ui.cpp:2255
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "Błąd tworzenia transakcji "
|
||||
|
||||
#: ../../../src/ui.cpp:2262
|
||||
msgid "Transaction aborted"
|
||||
msgstr "Transakcję przerwano"
|
||||
|
||||
#: ../../../src/ui.cpp:2270
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "Utracono połączenie, transakcja anulowana"
|
||||
|
||||
#: ../../../src/ui.cpp:2286
|
||||
msgid "Sending payment..."
|
||||
msgstr "Wysyłanie płatności..."
|
||||
|
||||
#: ../../../src/ui.cpp:2292
|
||||
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Transakcja została odrzucona. Może się tak zdarzyć jeżeli część monet w twoim portfelu zostało wydanych, np. gdy użyto kopii pliku wallet.dat i monety zostały wydane w kopii, a tutaj nie zostały oznaczone jako wydane."
|
||||
|
||||
#: ../../../src/ui.cpp:2301
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "Oczekiwanie na potwierdzenie..."
|
||||
|
||||
#: ../../../src/ui.cpp:2319
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"The transaction is recorded and will credit to the recipient,\n"
|
||||
"but the comment information will be blank."
|
||||
msgstr ""
|
||||
"Płatność została wysłana, ale odbiorca nie mógł jej zweryfikować.\n"
|
||||
"Transakcja została zarejestrowana i zostanie przypisana do odbiorcy,\n"
|
||||
"ale informacja w komentarzu będzie pusta."
|
||||
|
||||
#: ../../../src/ui.cpp:2328
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "Płatność została wysłana, ale otrzymano nieprawidłową odpowiedź"
|
||||
|
||||
#: ../../../src/ui.cpp:2334
|
||||
msgid "Payment completed"
|
||||
msgstr "Płatność zakończona"
|
||||
|
||||
#: ../../../src/ui.cpp:2376
|
||||
#: ../../../src/ui.cpp:2522
|
||||
#: ../../../src/ui.cpp:2559
|
||||
msgid "Name"
|
||||
msgstr "Nazwa"
|
||||
|
||||
#: ../../../src/ui.cpp:2377
|
||||
#: ../../../src/ui.cpp:2522
|
||||
#: ../../../src/ui.cpp:2559
|
||||
msgid "Address"
|
||||
msgstr "Adres"
|
||||
|
||||
#: ../../../src/ui.cpp:2379
|
||||
#: ../../../src/ui.cpp:2534
|
||||
msgid "Label"
|
||||
msgstr "Etykieta"
|
||||
|
||||
#: ../../../src/ui.cpp:2380
|
||||
#: ../../../src/uibase.cpp:837
|
||||
msgid "Bitcoin Address"
|
||||
msgstr "Adres Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2504
|
||||
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
|
||||
msgstr "To jest jeden z twoich adresów na otrzymywane płatności i nie może zostać wpisany do księgi adresowej."
|
||||
|
||||
#: ../../../src/ui.cpp:2522
|
||||
#: ../../../src/ui.cpp:2528
|
||||
msgid "Edit Address"
|
||||
msgstr "Edytuj Adres"
|
||||
|
||||
#: ../../../src/ui.cpp:2534
|
||||
msgid "Edit Address Label"
|
||||
msgstr "Edytuj Etykietę Adresu"
|
||||
|
||||
#: ../../../src/ui.cpp:2559
|
||||
#: ../../../src/ui.cpp:2565
|
||||
msgid "Add Address"
|
||||
msgstr "Dodaj Adres"
|
||||
|
||||
#: ../../../src/ui.cpp:2642
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2644
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - Generowanie"
|
||||
|
||||
#: ../../../src/ui.cpp:2646
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (nie połączony)"
|
||||
|
||||
#: ../../../src/ui.cpp:2725
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "&Otwórz Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2726
|
||||
msgid "&Send Bitcoins"
|
||||
msgstr "&Wyślij Bitcoiny"
|
||||
|
||||
#: ../../../src/ui.cpp:2727
|
||||
msgid "O&ptions..."
|
||||
msgstr "O&pcje..."
|
||||
|
||||
#: ../../../src/ui.cpp:2730
|
||||
#: ../../../src/uibase.cpp:25
|
||||
msgid "E&xit"
|
||||
msgstr "W&yjście"
|
||||
|
||||
#: ../../../src/ui.cpp:2956
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "Program uległ awarii i zostanie przerwany."
|
||||
|
||||
#: ../../../src/main.cpp:1430
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "Ostrzeżenie: Mało miejsca na dysku"
|
||||
|
||||
#: ../../../src/uibase.cpp:28
|
||||
msgid "&File"
|
||||
msgstr "&Plik"
|
||||
|
||||
#: ../../../src/uibase.cpp:32
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "&Twój Adres Odbiorczy..."
|
||||
|
||||
#: ../../../src/uibase.cpp:36
|
||||
msgid "&Options..."
|
||||
msgstr "&Opcje..."
|
||||
|
||||
#: ../../../src/uibase.cpp:39
|
||||
msgid "&Settings"
|
||||
msgstr "&Ustawienia"
|
||||
|
||||
#: ../../../src/uibase.cpp:43
|
||||
msgid "&About..."
|
||||
msgstr "&O programie..."
|
||||
|
||||
#: ../../../src/uibase.cpp:46
|
||||
msgid "&Help"
|
||||
msgstr "&Pomoc"
|
||||
|
||||
#: ../../../src/uibase.cpp:56
|
||||
msgid "Address Book"
|
||||
msgstr "Księga Adresowa"
|
||||
|
||||
#: ../../../src/uibase.cpp:69
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "Twój Adres Bitcoin:"
|
||||
|
||||
#: ../../../src/uibase.cpp:76
|
||||
msgid " &New... "
|
||||
msgstr " &Nowy..."
|
||||
|
||||
#: ../../../src/uibase.cpp:79
|
||||
#: ../../../src/uibase.cpp:780
|
||||
#: ../../../src/uibase.cpp:883
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr " &Kopiuj do schowka "
|
||||
|
||||
#: ../../../src/uibase.cpp:93
|
||||
msgid "Balance:"
|
||||
msgstr "Saldo:"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " All"
|
||||
msgstr " Wszystko"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Sent"
|
||||
msgstr "Wysłano"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Received"
|
||||
msgstr "Otrzymano"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " In Progress"
|
||||
msgstr "W Trakcie"
|
||||
|
||||
#: ../../../src/uibase.cpp:130
|
||||
msgid "All Transactions"
|
||||
msgstr "Wszystkie Transakcje"
|
||||
|
||||
#: ../../../src/uibase.cpp:141
|
||||
msgid "Sent/Received"
|
||||
msgstr "Wysłano/Otrzymano"
|
||||
|
||||
#: ../../../src/uibase.cpp:152
|
||||
msgid "Sent"
|
||||
msgstr "Wysłano"
|
||||
|
||||
#: ../../../src/uibase.cpp:163
|
||||
msgid "Received"
|
||||
msgstr "Otrzymano"
|
||||
|
||||
#: ../../../src/uibase.cpp:302
|
||||
#: ../../../src/uibase.cpp:443
|
||||
#: ../../../src/uibase.cpp:542
|
||||
#: ../../../src/uibase.cpp:722
|
||||
#: ../../../src/uibase.cpp:783
|
||||
#: ../../../src/uibase.cpp:892
|
||||
#: ../../../src/uibase.cpp:981
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: ../../../src/uibase.cpp:345
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
msgstr "&Uruchom Bitcoin wraz ze startem systemu"
|
||||
|
||||
#: ../../../src/uibase.cpp:348
|
||||
msgid "&Minimize to the tray instead of the taskbar"
|
||||
msgstr "&Zminimalizuj do traya zamiast do paska zadań"
|
||||
|
||||
#: ../../../src/uibase.cpp:351
|
||||
msgid "Map port using &UPnP"
|
||||
msgstr "Mapuj port używając &UPnP"
|
||||
|
||||
#: ../../../src/uibase.cpp:354
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "Zm&inimalizuj do traya przy zamknięciu"
|
||||
|
||||
#: ../../../src/uibase.cpp:360
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "&Połącz przez socks4 proxy:"
|
||||
|
||||
#: ../../../src/uibase.cpp:371
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "Proxy &IP:"
|
||||
|
||||
#: ../../../src/uibase.cpp:379
|
||||
msgid " &Port:"
|
||||
msgstr " &Port:"
|
||||
|
||||
#: ../../../src/uibase.cpp:392
|
||||
msgid "Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."
|
||||
msgstr "Opcjonalna prowizja określona dla KB transakcji, która zapewni, że twoje transakcje będą szybko przetworzone. Większość transakcji to 1KB. Rekomendowana prowizja to 0.01."
|
||||
|
||||
#: ../../../src/uibase.cpp:399
|
||||
msgid "Pay transaction fee:"
|
||||
msgstr "Płać prowizję transakcji:"
|
||||
|
||||
#: ../../../src/uibase.cpp:420
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:424
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:446
|
||||
#: ../../../src/uibase.cpp:668
|
||||
#: ../../../src/uibase.cpp:727
|
||||
#: ../../../src/uibase.cpp:786
|
||||
#: ../../../src/uibase.cpp:895
|
||||
#: ../../../src/uibase.cpp:984
|
||||
msgid "Cancel"
|
||||
msgstr "Anuluj"
|
||||
|
||||
#: ../../../src/uibase.cpp:449
|
||||
msgid "&Apply"
|
||||
msgstr "&Zastosuj"
|
||||
|
||||
#: ../../../src/uibase.cpp:508
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../src/uibase.cpp:514
|
||||
msgid "version"
|
||||
msgstr "wersja"
|
||||
|
||||
#: ../../../src/uibase.cpp:525
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"To oprogramowanie jest eksperymentalne.\n"
|
||||
"\n"
|
||||
"Dystrybuowane na licencji MIT/X11, zobacz towarzyszący plik \n"
|
||||
"license.txt lub http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"Ten produkt zawiera oprogramowanie rozwijane przez OpenSSL Project w \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) i oprogramowanie kryptograficzne napisane przez \n"
|
||||
"Erica Younga (eay@cryptsoft.com) oraz oprogramowanie UPnP napisane przez Thomasa Bernarda."
|
||||
|
||||
#: ../../../src/uibase.cpp:581
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
msgstr "Wprowadź adres Bitcoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
|
||||
#: ../../../src/uibase.cpp:595
|
||||
msgid "Pay &To:"
|
||||
msgstr "Wpłać &Dla:"
|
||||
|
||||
#: ../../../src/uibase.cpp:610
|
||||
msgid "&Paste"
|
||||
msgstr "&Wklej"
|
||||
|
||||
#: ../../../src/uibase.cpp:613
|
||||
msgid " Address &Book..."
|
||||
msgstr " Księga &Adresowa..."
|
||||
|
||||
#: ../../../src/uibase.cpp:620
|
||||
msgid "&Amount:"
|
||||
msgstr "&Kwota:"
|
||||
|
||||
#: ../../../src/uibase.cpp:630
|
||||
msgid "T&ransfer:"
|
||||
msgstr "T&ransfer:"
|
||||
|
||||
#: ../../../src/uibase.cpp:636
|
||||
msgid " Standard"
|
||||
msgstr " Standard"
|
||||
|
||||
#: ../../../src/uibase.cpp:663
|
||||
msgid "&Send"
|
||||
msgstr "&Wyślij"
|
||||
|
||||
#: ../../../src/uibase.cpp:711
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Łączenie..."
|
||||
|
||||
#: ../../../src/uibase.cpp:761
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
|
||||
msgstr "To są twoje adresy Bitcoin dla otrzymywania płatności. Możesz chcieć podać różne dla każdego płacącego aby kontrolować kto ci płaci. Wyróżniony adres będzie wyświetlany w oknie głównym."
|
||||
|
||||
#: ../../../src/uibase.cpp:774
|
||||
#: ../../../src/uibase.cpp:886
|
||||
msgid "&Edit..."
|
||||
msgstr "&Edytuj..."
|
||||
|
||||
#: ../../../src/uibase.cpp:777
|
||||
#: ../../../src/uibase.cpp:889
|
||||
msgid " &New Address... "
|
||||
msgstr " &Nowy Adres..."
|
||||
|
||||
#: ../../../src/uibase.cpp:849
|
||||
msgid "Sending"
|
||||
msgstr "Wysyłanie"
|
||||
|
||||
#: ../../../src/uibase.cpp:857
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
|
||||
msgstr "To są twoje adresy Bitcoin dla otrzymywania płatności. Możesz podać różne dla każdego płacącego aby kontrolować kto ci płaci. Wyróżniony adres będzie wyświetlany w oknie głównym."
|
||||
|
||||
#: ../../../src/uibase.cpp:870
|
||||
msgid "Receiving"
|
||||
msgstr "Otrzymywanie"
|
||||
|
||||
#: ../../../src/uibase.cpp:880
|
||||
msgid "&Delete"
|
||||
msgstr "&Usuń"
|
||||
|
||||
#: ../../../src/wallet.cpp:917
|
||||
#, c-format
|
||||
msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "
|
||||
msgstr "Błąd: Ta transakcja wymaga prowizji co najmniej %s z uwagi na kwotę, złożoność lub użycie niedawno otrzymanych funduszy"
|
||||
|
||||
#: ../../../src/wallet.cpp:919
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "Błąd: Nie udało się utworzyć transakcji"
|
||||
|
||||
#: ../../../src/wallet.cpp:928
|
||||
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Błąd: Transakcja została odrzucona. Może się tak zdarzyć jeżeli część monet w twoim portfelu zostało wydanych, np. gdy użyto kopii pliku wallet.dat i monety zostały wydane w kopii, a tutaj nie zostały oznaczone jako wydane."
|
||||
|
||||
#: ../../../src/wallet.cpp:941
|
||||
msgid "Invalid amount"
|
||||
msgstr "Niewłaściwa kwota"
|
||||
|
||||
#: ../../../src/wallet.cpp:948
|
||||
msgid "Invalid bitcoin address"
|
||||
msgstr "Niewłaściwy adres bitcoin"
|
||||
|
||||
#: ../../../src/uibase.h:147
|
||||
msgid "Transaction Details"
|
||||
msgstr "Szczegóły Transakcji"
|
||||
|
||||
#: ../../../src/uibase.h:199
|
||||
msgid "Options"
|
||||
msgstr "Opcje"
|
||||
|
||||
#: ../../../src/uibase.h:228
|
||||
msgid "About Bitcoin"
|
||||
msgstr "O Bitcoin"
|
||||
|
||||
#: ../../../src/uibase.h:337
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "Twoje Adresy Bitcoin"
|
||||
|
||||
@@ -319,8 +319,8 @@ msgstr "&Minimizar ao fechar"
|
||||
|
||||
#: ../../../ui.cpp:1595
|
||||
#, c-format
|
||||
msgid "version 0.%d.%d beta"
|
||||
msgstr "versão 0.%d.%d beta"
|
||||
msgid "version %s%s BETA"
|
||||
msgstr "versão %s%s BETA"
|
||||
|
||||
#: ../../../ui.cpp:1681
|
||||
msgid "Will appear as \"From: Unknown\""
|
||||
@@ -527,11 +527,6 @@ msgstr "&Abrir Bitcoin"
|
||||
msgid "O&ptions..."
|
||||
msgstr "O&pções"
|
||||
|
||||
#: ../../../ui.cpp:2502
|
||||
#: ../../../uibase.cpp:34
|
||||
msgid "&Generate Coins"
|
||||
msgstr "&Gerar Moedas"
|
||||
|
||||
#: ../../../ui.cpp:2505
|
||||
#: ../../../uibase.cpp:27
|
||||
msgid "E&xit"
|
||||
@@ -696,7 +691,7 @@ msgstr "versão"
|
||||
|
||||
#: ../../../uibase.cpp:563
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"Copyright (c) 2009-2010 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
@@ -705,9 +700,9 @@ msgid ""
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com)."
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"Copyright (c) 2009-2010 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"Este software é experimental.\n"
|
||||
"\n"
|
||||
@@ -716,7 +711,8 @@ msgstr ""
|
||||
"http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"Este producto inclui software desenvolvido pelo projecto OpenSSL, para \n"
|
||||
"ser utilizado no OpenSSL Toolkit (http://www.openssl.org) e software de \n"
|
||||
"criptografia desenvolvido por Eric Young (eay@cryptsoft.com)."
|
||||
"criptografia desenvolvido por Eric Young (eay@cryptsoft.com)\n"
|
||||
"e UPnP software escrito por Thomas Bernard."
|
||||
|
||||
#: ../../../uibase.cpp:619
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
|
||||
|
||||
BIN
locale/ru/LC_MESSAGES/bitcoin.mo
Normal file
1021
locale/ru/LC_MESSAGES/bitcoin.po
Normal file
BIN
locale/sv/LC_MESSAGES/bitcoin.mo
Normal file
973
locale/sv/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,973 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-07-03 10:40+0100\n"
|
||||
"PO-Revision-Date: 2011-07-03 15:13+0100\n"
|
||||
"Last-Translator: Codler <github>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../init.cpp:162
|
||||
msgid "Bitcoin version"
|
||||
msgstr "Bitcoin version"
|
||||
|
||||
#: ../../../init.cpp:163
|
||||
msgid "Usage:"
|
||||
msgstr "Användning:"
|
||||
|
||||
#: ../../../init.cpp:165
|
||||
msgid "Send command to -server or bitcoind\n"
|
||||
msgstr "Skicka kommando till -server eller bitcoind\n"
|
||||
|
||||
#: ../../../init.cpp:166
|
||||
msgid "List commands\n"
|
||||
msgstr "Lista kommandon\n"
|
||||
|
||||
#: ../../../init.cpp:167
|
||||
msgid "Get help for a command\n"
|
||||
msgstr "Få hjälp om kommandon\n"
|
||||
|
||||
#: ../../../init.cpp:168
|
||||
msgid "Options:\n"
|
||||
msgstr "Val:\n"
|
||||
|
||||
#: ../../../init.cpp:169
|
||||
msgid "Specify configuration file (default: bitcoin.conf)\n"
|
||||
msgstr "Ange konfigurationsfil (standard: bitcoin.conf)\n"
|
||||
|
||||
#: ../../../init.cpp:170
|
||||
msgid "Specify pid file (default: bitcoind.pid)\n"
|
||||
msgstr "Ange pid-fil (standard: bitcoind.pid)\n"
|
||||
|
||||
#: ../../../init.cpp:171
|
||||
msgid "Generate coins\n"
|
||||
msgstr "Generera mynt\n"
|
||||
|
||||
#: ../../../init.cpp:172
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "Generera inte mynt\n"
|
||||
|
||||
#: ../../../init.cpp:173
|
||||
msgid "Start minimized\n"
|
||||
msgstr "Starta minimerad\n"
|
||||
|
||||
#: ../../../init.cpp:174
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "Ange data mappen\n"
|
||||
|
||||
#: ../../../init.cpp:175
|
||||
msgid "Specify connection timeout (in milliseconds)\n"
|
||||
msgstr "Ange timeout för anslutning (i millisekunder)\n"
|
||||
|
||||
#: ../../../init.cpp:176
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
msgstr "Anslut via socks4 proxy\n"
|
||||
|
||||
#: ../../../init.cpp:177
|
||||
msgid "Allow DNS lookups for addnode and connect\n"
|
||||
msgstr "Tillåt DNS uppslagningar för addnode och connect\n"
|
||||
|
||||
#: ../../../init.cpp:178
|
||||
msgid "Add a node to connect to\n"
|
||||
msgstr "Lägg till en nod att ansluta till\n"
|
||||
|
||||
#: ../../../init.cpp:179
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "Anslut endast till specifik nod\n"
|
||||
|
||||
#: ../../../init.cpp:180
|
||||
msgid "Don't accept connections from outside\n"
|
||||
msgstr "Acceptera ej anslutningar från utsidan\n"
|
||||
|
||||
#: ../../../init.cpp:183
|
||||
msgid "Don't attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Försöker inte använda UPnP till avslyssningsport\n"
|
||||
|
||||
#: ../../../init.cpp:185
|
||||
msgid "Attempt to use UPnP to map the listening port\n"
|
||||
msgstr "Försöker använda UPnP till avlyssningsport\n"
|
||||
|
||||
#: ../../../init.cpp:188
|
||||
msgid "Fee per KB to add to transactions you send\n"
|
||||
msgstr "Avgift per KB som läggs på transaktionen när du sänder\n"
|
||||
|
||||
#: ../../../init.cpp:190
|
||||
msgid "Accept command line and JSON-RPC commands\n"
|
||||
msgstr "Accepterar kommandorad och JSON-RPC kommando\n"
|
||||
|
||||
#: ../../../init.cpp:193
|
||||
msgid "Run in the background as a daemon and accept commands\n"
|
||||
msgstr "Kör i bakgrund som daemon och accepterar kommando\n"
|
||||
|
||||
#: ../../../init.cpp:195
|
||||
msgid "Use the test network\n"
|
||||
msgstr "Använd test nätverk\n"
|
||||
|
||||
#: ../../../init.cpp:196
|
||||
msgid "Username for JSON-RPC connections\n"
|
||||
msgstr "Användarnamn till JSON-RPC anslutning\n"
|
||||
|
||||
#: ../../../init.cpp:197
|
||||
msgid "Password for JSON-RPC connections\n"
|
||||
msgstr "Lösenord till JSON-RPC anslutning\n"
|
||||
|
||||
#: ../../../init.cpp:198
|
||||
msgid "Listen for JSON-RPC connections on <port> (default: 8332)\n"
|
||||
msgstr "Lyssnar på JSON-RPC anslutningar på <port> (standard: 8332)\n"
|
||||
|
||||
#: ../../../init.cpp:199
|
||||
msgid "Allow JSON-RPC connections from specified IP address\n"
|
||||
msgstr "Tillåt JSON-RPC anslutningar från specifik IP-adress\n"
|
||||
|
||||
#: ../../../init.cpp:200
|
||||
msgid "Send commands to node running on <ip> (default: 127.0.0.1)\n"
|
||||
msgstr "Skicka kommando till noden som körs på <ip> (standard: 127.0.0.1)\n"
|
||||
|
||||
#: ../../../init.cpp:201
|
||||
msgid "Set key pool size to <n> (default: 100)\n"
|
||||
msgstr "Sätt nyckel pool storlek till <n> (standard: 100)\n"
|
||||
|
||||
#: ../../../init.cpp:202
|
||||
msgid "Rescan the block chain for missing wallet transactions\n"
|
||||
msgstr "Scanna om block kedja efter saknade plånbokstransaktioner\n"
|
||||
|
||||
#: ../../../init.cpp:206
|
||||
msgid ""
|
||||
"\n"
|
||||
"SSL options: (see the Bitcoin Wiki for SSL setup instructions)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"SSL val: (Se på Bitcoin Wiki för SSL installation instruktioner)\n"
|
||||
|
||||
#: ../../../init.cpp:207
|
||||
msgid "Use OpenSSL (https) for JSON-RPC connections\n"
|
||||
msgstr "Använd OpenSSL (https) till JSON-RPC anslutningar\n"
|
||||
|
||||
#: ../../../init.cpp:208
|
||||
msgid "Server certificate file (default: server.cert)\n"
|
||||
msgstr "Server certifikatfil (standard: server.cert)\n"
|
||||
|
||||
#: ../../../init.cpp:209
|
||||
msgid "Server private key (default: server.pem)\n"
|
||||
msgstr "Server privat nyckel (standard: server.pem)\n"
|
||||
|
||||
#: ../../../init.cpp:210
|
||||
msgid "Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
msgstr "Acceptabla krypteringar (standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
|
||||
#: ../../../init.cpp:214
|
||||
msgid "This help message\n"
|
||||
msgstr "Detta hjälpmeddelande\n"
|
||||
|
||||
#: ../../../init.cpp:351
|
||||
#, c-format
|
||||
msgid "Cannot obtain a lock on data directory %s. Bitcoin is probably already running."
|
||||
msgstr "Kan inte sätta lås på data mappen %s. Bitcoin körs troligen redan."
|
||||
|
||||
#: ../../../init.cpp:377
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "Fel vid laddning av addr.dat \n"
|
||||
|
||||
#: ../../../init.cpp:383
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "Fel vid laddning av blkindex.dat \n"
|
||||
|
||||
#: ../../../init.cpp:391
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "Fel vid laddning av wallet.dat \n"
|
||||
|
||||
#: ../../../init.cpp:481
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "Ogiltig -proxy adress"
|
||||
|
||||
#: ../../../init.cpp:506
|
||||
msgid "Invalid amount for -paytxfee=<amount>"
|
||||
msgstr "Ogiltig belopp på -paytxfee=<belopp>"
|
||||
|
||||
#: ../../../init.cpp:510
|
||||
msgid "Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."
|
||||
msgstr "Varning: -paytxfee är satt väldigt högt. Denna är transaktionsavgiften som du kommer att betala om du skickar en transaktion."
|
||||
|
||||
#: ../../../main.cpp:1430
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "Varning: Diskutrymme är låg "
|
||||
|
||||
#: ../../../net.cpp:1598
|
||||
#, c-format
|
||||
msgid "Unable to bind to port %d on this computer. Bitcoin is probably already running."
|
||||
msgstr "Det gick inte att binda till port %d på denna dator. Bitcoin körs troligen redan."
|
||||
|
||||
#: ../../../rpc.cpp:1828
|
||||
#: ../../../rpc.cpp:1830
|
||||
#, c-format
|
||||
msgid "To use the %s option"
|
||||
msgstr "För att använda %s val"
|
||||
|
||||
#: ../../../rpc.cpp:1832
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Warning: %s, you must set rpcpassword=<password>\n"
|
||||
"in the configuration file: %s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions.\n"
|
||||
msgstr ""
|
||||
"Varning: %s, du måste sätta rpcpassword=<lösenord>\n"
|
||||
"i konfigurationsfilen: %s\n"
|
||||
"Om filen inte existerar, skapa med ägare med filbehörigheten -readable-only.\n"
|
||||
|
||||
#: ../../../rpc.cpp:2005
|
||||
#, c-format
|
||||
msgid ""
|
||||
"You must set rpcpassword=<password> in the configuration file:\n"
|
||||
"%s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions."
|
||||
msgstr ""
|
||||
"Du måste sätta rpcpassword=<lösenord> i konfigurationsfilen:\n"
|
||||
"%s\n"
|
||||
"Om filen inte existerar, skapa med ägare med filbehörighete -readable-only."
|
||||
|
||||
#: ../../../ui.cpp:216
|
||||
#, c-format
|
||||
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
|
||||
msgstr "Denna transaktion är över storleksbegränsningen. Du kan fortfarande skicka mot en avgift på %s, som går till noderna som bearbetar din transaktion och hjälper att stödja nätverket. Vill du fortfarande betala avgiften?"
|
||||
|
||||
#: ../../../ui.cpp:316
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
#: ../../../ui.cpp:317
|
||||
msgid "Date"
|
||||
msgstr "Datum"
|
||||
|
||||
#: ../../../ui.cpp:318
|
||||
msgid "Description"
|
||||
msgstr "Beskrivning"
|
||||
|
||||
#: ../../../ui.cpp:319
|
||||
msgid "Debit"
|
||||
msgstr "Debet"
|
||||
|
||||
#: ../../../ui.cpp:320
|
||||
msgid "Credit"
|
||||
msgstr "Kredit"
|
||||
|
||||
#: ../../../ui.cpp:526
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "Öppen för %d block"
|
||||
|
||||
#: ../../../ui.cpp:528
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "Öppen tills %s"
|
||||
|
||||
#: ../../../ui.cpp:534
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/offline?"
|
||||
|
||||
#: ../../../ui.cpp:536
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/obekräftade"
|
||||
|
||||
#: ../../../ui.cpp:538
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d bekräftelser"
|
||||
|
||||
#: ../../../ui.cpp:623
|
||||
msgid "Generated"
|
||||
msgstr "Genererad"
|
||||
|
||||
#: ../../../ui.cpp:631
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "Genererad (%s mognar om %d block)"
|
||||
|
||||
#: ../../../ui.cpp:635
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "Genererad - Varning: Denna block har inte blivit mottagen av någon annan nod och kommer troligtvis inte bli accepterad"
|
||||
|
||||
#: ../../../ui.cpp:639
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "Genererad (ej accepterad)"
|
||||
|
||||
#: ../../../ui.cpp:649
|
||||
msgid "From: "
|
||||
msgstr "Från: "
|
||||
|
||||
#: ../../../ui.cpp:673
|
||||
msgid "Received with: "
|
||||
msgstr "Mottagen med: "
|
||||
|
||||
#: ../../../ui.cpp:719
|
||||
msgid "Payment to yourself"
|
||||
msgstr "Betalning till dig själv"
|
||||
|
||||
#: ../../../ui.cpp:753
|
||||
msgid "To: "
|
||||
msgstr "Till: "
|
||||
|
||||
#: ../../../ui.cpp:1068
|
||||
msgid " Generating"
|
||||
msgstr " Generering"
|
||||
|
||||
#: ../../../ui.cpp:1070
|
||||
msgid "(not connected)"
|
||||
msgstr "(inte ansluten)"
|
||||
|
||||
#: ../../../ui.cpp:1073
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d anslutningar %d block %d transaktioner"
|
||||
|
||||
#: ../../../ui.cpp:1178
|
||||
#: ../../../ui.cpp:2577
|
||||
msgid "New Receiving Address"
|
||||
msgstr "Ny Mottagningsadress"
|
||||
|
||||
#: ../../../ui.cpp:1179
|
||||
#: ../../../ui.cpp:2578
|
||||
msgid ""
|
||||
"You should use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"Du borde använda en ny adress för varje betalning som du mottagit.\n"
|
||||
"\n"
|
||||
"Etikett"
|
||||
|
||||
#: ../../../ui.cpp:1252
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>Status:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1257
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ", har inte lyckats broadcast än"
|
||||
|
||||
#: ../../../ui.cpp:1259
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ", broadcast genom %d nod"
|
||||
|
||||
#: ../../../ui.cpp:1261
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ", broadcast genom %d noder"
|
||||
|
||||
#: ../../../ui.cpp:1265
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>Datum:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1273
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>Källa:</b> Genererad<br>"
|
||||
|
||||
#: ../../../ui.cpp:1279
|
||||
#: ../../../ui.cpp:1297
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>Från:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1297
|
||||
msgid "unknown"
|
||||
msgstr "okänd"
|
||||
|
||||
#: ../../../ui.cpp:1298
|
||||
#: ../../../ui.cpp:1322
|
||||
#: ../../../ui.cpp:1381
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>Till:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1301
|
||||
msgid " (yours, label: "
|
||||
msgstr " (din, etikett: "
|
||||
|
||||
#: ../../../ui.cpp:1303
|
||||
msgid " (yours)"
|
||||
msgstr " (ditt)"
|
||||
|
||||
#: ../../../ui.cpp:1340
|
||||
#: ../../../ui.cpp:1352
|
||||
#: ../../../ui.cpp:1398
|
||||
#: ../../../ui.cpp:1415
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr "<b>Kredit:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1342
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s mognar om %d block)"
|
||||
|
||||
#: ../../../ui.cpp:1344
|
||||
msgid "(not accepted)"
|
||||
msgstr "(ej accepterad)"
|
||||
|
||||
#: ../../../ui.cpp:1389
|
||||
#: ../../../ui.cpp:1397
|
||||
#: ../../../ui.cpp:1412
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr "<b>Debet:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1403
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>Transaktionsavgift:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1419
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>Nät belopp:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1426
|
||||
msgid "Message:"
|
||||
msgstr "Meddelande:"
|
||||
|
||||
#: ../../../ui.cpp:1428
|
||||
msgid "Comment:"
|
||||
msgstr "Kommentar:"
|
||||
|
||||
#: ../../../ui.cpp:1431
|
||||
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
|
||||
msgstr "Genererad mynt måste vänta 120 block innan dem kan användas.När du genererat denna block, skickades en broadcast till nätet och lades till block kedjan. Om den misslyckas att lägga till kedjan så kommer det ändras till \"not accepted\" och är icke brukbar. Detta kan hända om en annan nod genererat en block några sekunder efter din."
|
||||
|
||||
#: ../../../ui.cpp:1611
|
||||
msgid "Cannot write autostart/bitcoin.desktop file"
|
||||
msgstr "Kan inte skriva autostart/bitcoin.desktop fil"
|
||||
|
||||
#: ../../../ui.cpp:1647
|
||||
msgid "Main"
|
||||
msgstr "Allmänt"
|
||||
|
||||
#: ../../../ui.cpp:1657
|
||||
msgid "&Start Bitcoin on window system startup"
|
||||
msgstr "&Starta Bitcoin vid system uppstart"
|
||||
|
||||
#: ../../../ui.cpp:1664
|
||||
msgid "&Minimize on close"
|
||||
msgstr "&Minimera vid stängning"
|
||||
|
||||
#: ../../../ui.cpp:1806
|
||||
#, c-format
|
||||
msgid "version %s"
|
||||
msgstr "version %s"
|
||||
|
||||
#: ../../../ui.cpp:1929
|
||||
msgid "Error in amount "
|
||||
msgstr "Fel i belopp "
|
||||
|
||||
#: ../../../ui.cpp:1929
|
||||
#: ../../../ui.cpp:1934
|
||||
#: ../../../ui.cpp:1939
|
||||
#: ../../../ui.cpp:1974
|
||||
#: ../../../uibase.cpp:55
|
||||
msgid "Send Coins"
|
||||
msgstr "Skicka mynt"
|
||||
|
||||
#: ../../../ui.cpp:1934
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "Belopp överskrider din balans "
|
||||
|
||||
#: ../../../ui.cpp:1939
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "Totalt överskrider din balans när "
|
||||
|
||||
#: ../../../ui.cpp:1939
|
||||
msgid " transaction fee is included "
|
||||
msgstr " transaktionsavgift är inkluderad "
|
||||
|
||||
#: ../../../ui.cpp:1957
|
||||
msgid "Payment sent "
|
||||
msgstr "Betalning skickad "
|
||||
|
||||
#: ../../../ui.cpp:1957
|
||||
#: ../../../ui.cpp:1962
|
||||
#: ../../../ui.cpp:2108
|
||||
#: ../../../ui.cpp:2261
|
||||
#: ../../../wallet.cpp:924
|
||||
msgid "Sending..."
|
||||
msgstr "Skickar..."
|
||||
|
||||
#: ../../../ui.cpp:1974
|
||||
msgid "Invalid address "
|
||||
msgstr "Ogiltig adress "
|
||||
|
||||
#: ../../../ui.cpp:2029
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "Skickar %s till %s"
|
||||
|
||||
#: ../../../ui.cpp:2102
|
||||
#: ../../../ui.cpp:2135
|
||||
msgid "CANCELLED"
|
||||
msgstr "AVBRUTEN"
|
||||
|
||||
#: ../../../ui.cpp:2106
|
||||
msgid "Cancelled"
|
||||
msgstr "Avbruten"
|
||||
|
||||
#: ../../../ui.cpp:2108
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "Överföring avbruten "
|
||||
|
||||
#: ../../../ui.cpp:2161
|
||||
msgid "Error: "
|
||||
msgstr "Fel: "
|
||||
|
||||
#: ../../../ui.cpp:2175
|
||||
#: ../../../ui.cpp:2246
|
||||
#: ../../../wallet.cpp:943
|
||||
msgid "Insufficient funds"
|
||||
msgstr "Otillräckligt med pengar"
|
||||
|
||||
#: ../../../ui.cpp:2180
|
||||
msgid "Connecting..."
|
||||
msgstr "Ansluter..."
|
||||
|
||||
#: ../../../ui.cpp:2185
|
||||
msgid "Unable to connect"
|
||||
msgstr "Det gick inte att ansluta"
|
||||
|
||||
#: ../../../ui.cpp:2190
|
||||
msgid "Requesting public key..."
|
||||
msgstr "Efterfrågar publik nyckel..."
|
||||
|
||||
#: ../../../ui.cpp:2202
|
||||
msgid "Received public key..."
|
||||
msgstr "Mottagen publik nyckel..."
|
||||
|
||||
#: ../../../ui.cpp:2216
|
||||
msgid "Recipient is not accepting transactions sent by IP address"
|
||||
msgstr "Mottagaren accepterar inte transaktioner skickat från IP adress"
|
||||
|
||||
#: ../../../ui.cpp:2218
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "Överföringen var inte accepterad"
|
||||
|
||||
#: ../../../ui.cpp:2227
|
||||
msgid "Invalid response received"
|
||||
msgstr "Ogiltig respons mottagen"
|
||||
|
||||
#: ../../../ui.cpp:2242
|
||||
msgid "Creating transaction..."
|
||||
msgstr "Skapar transation..."
|
||||
|
||||
#: ../../../ui.cpp:2254
|
||||
#, c-format
|
||||
msgid "This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds"
|
||||
msgstr "Denna transaktion kräver en transaktionsavgift minst %s för dess belopp, komplexitet, eller användning av nyligen mottagna pengar"
|
||||
|
||||
#: ../../../ui.cpp:2256
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "Misslyckades skapa transaktion"
|
||||
|
||||
#: ../../../ui.cpp:2263
|
||||
msgid "Transaction aborted"
|
||||
msgstr "Transaktion avbruten"
|
||||
|
||||
#: ../../../ui.cpp:2271
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "Förlorad anslutning, transaktionen avbruten"
|
||||
|
||||
#: ../../../ui.cpp:2287
|
||||
msgid "Sending payment..."
|
||||
msgstr "Skickar betalning..."
|
||||
|
||||
#: ../../../ui.cpp:2293
|
||||
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Transaktionen blev nekad. Detta kan hända om några av dina mynt i din plånbok var redan spenderad. Till exempel om du använde en kopia av wallet.dat och mynten var redan spenderad i kopian, men som inte var markerad som spenderad här."
|
||||
|
||||
#: ../../../ui.cpp:2302
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "Väntar på bekräftelse..."
|
||||
|
||||
#: ../../../ui.cpp:2320
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"The transaction is recorded and will credit to the recipient,\n"
|
||||
"but the comment information will be blank."
|
||||
msgstr ""
|
||||
"Betalning var skickat, men mottagaren kunde inte verifiera det.\n"
|
||||
"Transaktionen är registrerad och kommer att kreditera mottagaren,\n"
|
||||
"men kommentar informationen kommer att vara tom."
|
||||
|
||||
#: ../../../ui.cpp:2329
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "Betalning var skickad, men en ogiltig respons var mottagen"
|
||||
|
||||
#: ../../../ui.cpp:2335
|
||||
msgid "Payment completed"
|
||||
msgstr "Betalning slutförd"
|
||||
|
||||
#: ../../../ui.cpp:2377
|
||||
#: ../../../ui.cpp:2525
|
||||
#: ../../../ui.cpp:2565
|
||||
msgid "Name"
|
||||
msgstr "Namn"
|
||||
|
||||
#: ../../../ui.cpp:2378
|
||||
#: ../../../ui.cpp:2525
|
||||
#: ../../../ui.cpp:2565
|
||||
msgid "Address"
|
||||
msgstr "Adress"
|
||||
|
||||
#: ../../../ui.cpp:2380
|
||||
#: ../../../ui.cpp:2537
|
||||
msgid "Label"
|
||||
msgstr "Etikett"
|
||||
|
||||
#: ../../../ui.cpp:2381
|
||||
#: ../../../uibase.cpp:837
|
||||
msgid "Bitcoin Address"
|
||||
msgstr "Bitcoin Adress"
|
||||
|
||||
#: ../../../ui.cpp:2507
|
||||
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
|
||||
msgstr "Denna är en av dina egna adresser för mottagning av betalningar och kan inte slås in i adressboken. "
|
||||
|
||||
#: ../../../ui.cpp:2525
|
||||
#: ../../../ui.cpp:2531
|
||||
msgid "Edit Address"
|
||||
msgstr "Ändra Adress"
|
||||
|
||||
#: ../../../ui.cpp:2537
|
||||
msgid "Edit Address Label"
|
||||
msgstr "Ändra Address Etikett"
|
||||
|
||||
#: ../../../ui.cpp:2565
|
||||
#: ../../../ui.cpp:2571
|
||||
msgid "Add Address"
|
||||
msgstr "Lägg till Adress"
|
||||
|
||||
#: ../../../ui.cpp:2649
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2651
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - Genererar"
|
||||
|
||||
#: ../../../ui.cpp:2653
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (ej ansluten)"
|
||||
|
||||
#: ../../../ui.cpp:2732
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "&Öppna Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2733
|
||||
msgid "&Send Bitcoins"
|
||||
msgstr "&Skicka Bitcoins"
|
||||
|
||||
#: ../../../ui.cpp:2734
|
||||
msgid "O&ptions..."
|
||||
msgstr "&Inställningar..."
|
||||
|
||||
#: ../../../ui.cpp:2737
|
||||
#: ../../../uibase.cpp:25
|
||||
msgid "E&xit"
|
||||
msgstr "&Avsluta"
|
||||
|
||||
#: ../../../ui.cpp:2963
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "Programmet har krachat och kommer att avslutas. "
|
||||
|
||||
#: ../../../uibase.cpp:28
|
||||
msgid "&File"
|
||||
msgstr "&Fil"
|
||||
|
||||
#: ../../../uibase.cpp:32
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "&Dina Mottagningsadresser..."
|
||||
|
||||
#: ../../../uibase.cpp:36
|
||||
msgid "&Options..."
|
||||
msgstr "&Inställningar..."
|
||||
|
||||
#: ../../../uibase.cpp:39
|
||||
msgid "&Settings"
|
||||
msgstr "&Inställningar"
|
||||
|
||||
#: ../../../uibase.cpp:43
|
||||
msgid "&About..."
|
||||
msgstr "&Om..."
|
||||
|
||||
#: ../../../uibase.cpp:46
|
||||
msgid "&Help"
|
||||
msgstr "&Hjälp"
|
||||
|
||||
#: ../../../uibase.cpp:56
|
||||
msgid "Address Book"
|
||||
msgstr "Adressbok"
|
||||
|
||||
#: ../../../uibase.cpp:69
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "Din Bitcoin Adress:"
|
||||
|
||||
#: ../../../uibase.cpp:76
|
||||
msgid " &New... "
|
||||
msgstr " &Nytt... "
|
||||
|
||||
#: ../../../uibase.cpp:79
|
||||
#: ../../../uibase.cpp:780
|
||||
#: ../../../uibase.cpp:883
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr " &Kopiera till Urklipp "
|
||||
|
||||
#: ../../../uibase.cpp:93
|
||||
msgid "Balance:"
|
||||
msgstr "Balans:"
|
||||
|
||||
#: ../../../uibase.cpp:109
|
||||
msgid " All"
|
||||
msgstr " Alla"
|
||||
|
||||
#: ../../../uibase.cpp:109
|
||||
msgid " Sent"
|
||||
msgstr " Skickat"
|
||||
|
||||
#: ../../../uibase.cpp:109
|
||||
msgid " Received"
|
||||
msgstr " Mottagen"
|
||||
|
||||
#: ../../../uibase.cpp:109
|
||||
msgid " In Progress"
|
||||
msgstr " Pågående"
|
||||
|
||||
#: ../../../uibase.cpp:130
|
||||
msgid "All Transactions"
|
||||
msgstr "Alla Transaktioner"
|
||||
|
||||
#: ../../../uibase.cpp:141
|
||||
msgid "Sent/Received"
|
||||
msgstr "Skickat/Mottagen"
|
||||
|
||||
#: ../../../uibase.cpp:152
|
||||
msgid "Sent"
|
||||
msgstr "Skickat"
|
||||
|
||||
#: ../../../uibase.cpp:163
|
||||
msgid "Received"
|
||||
msgstr "Mottagen"
|
||||
|
||||
#: ../../../uibase.cpp:302
|
||||
#: ../../../uibase.cpp:443
|
||||
#: ../../../uibase.cpp:542
|
||||
#: ../../../uibase.cpp:722
|
||||
#: ../../../uibase.cpp:783
|
||||
#: ../../../uibase.cpp:892
|
||||
#: ../../../uibase.cpp:981
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: ../../../uibase.cpp:345
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
msgstr "&Starta Bitcoin vid system uppstart"
|
||||
|
||||
#: ../../../uibase.cpp:348
|
||||
msgid "&Minimize to the tray instead of the taskbar"
|
||||
msgstr "&Minimerar till systemfältet istället för aktivitetsfält"
|
||||
|
||||
#: ../../../uibase.cpp:351
|
||||
msgid "Map port using &UPnP"
|
||||
msgstr "Mapp port använder &UPnP"
|
||||
|
||||
#: ../../../uibase.cpp:354
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "M&inimera till systemfältet vid stängning"
|
||||
|
||||
#: ../../../uibase.cpp:360
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "&Anslut via socks4 proxy: "
|
||||
|
||||
#: ../../../uibase.cpp:371
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "Proxy &IP:"
|
||||
|
||||
#: ../../../uibase.cpp:379
|
||||
msgid " &Port:"
|
||||
msgstr " &Port:"
|
||||
|
||||
#: ../../../uibase.cpp:392
|
||||
msgid "Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."
|
||||
msgstr "Frivillig transaktionsavgift per KB som garanterar att din transaktion bearbetas snabbt. Flesta transaktioner är 1KB. Avgift 0.01 rekommenderas."
|
||||
|
||||
#: ../../../uibase.cpp:399
|
||||
msgid "Pay transaction fee:"
|
||||
msgstr "Betala transaktionsavgift:"
|
||||
|
||||
#: ../../../uibase.cpp:420
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../uibase.cpp:424
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../uibase.cpp:446
|
||||
#: ../../../uibase.cpp:668
|
||||
#: ../../../uibase.cpp:727
|
||||
#: ../../../uibase.cpp:786
|
||||
#: ../../../uibase.cpp:895
|
||||
#: ../../../uibase.cpp:984
|
||||
msgid "Cancel"
|
||||
msgstr "Avbryt"
|
||||
|
||||
#: ../../../uibase.cpp:449
|
||||
msgid "&Apply"
|
||||
msgstr "&Använd"
|
||||
|
||||
#: ../../../uibase.cpp:508
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin "
|
||||
|
||||
#: ../../../uibase.cpp:514
|
||||
msgid "version"
|
||||
msgstr "version"
|
||||
|
||||
#: ../../../uibase.cpp:525
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"Detta är en experimentell mjukvara.\n"
|
||||
"\n"
|
||||
"Distribuerad under MIT/X11 mjukvarulicens, se medföljande fil \n"
|
||||
"license.txt eller http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"Denna produkt inkluderar mjukvara utvecklad av OpenSSL Project för användning i \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) och kryptografisk mjukvara skriven av \n"
|
||||
"Eric Young (eay@cryptsoft.com) och UPnP mjukvara skriven av Thomas Bernard.\n"
|
||||
"\n"
|
||||
"Översatt av Han Lin Yap."
|
||||
|
||||
#: ../../../uibase.cpp:581
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
msgstr "Ange en Bitcoin adress (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
|
||||
#: ../../../uibase.cpp:595
|
||||
msgid "Pay &To:"
|
||||
msgstr "Betala &Till:"
|
||||
|
||||
#: ../../../uibase.cpp:610
|
||||
msgid "&Paste"
|
||||
msgstr "&Klistra in"
|
||||
|
||||
#: ../../../uibase.cpp:613
|
||||
msgid " Address &Book..."
|
||||
msgstr " Adress&bok..."
|
||||
|
||||
#: ../../../uibase.cpp:620
|
||||
msgid "&Amount:"
|
||||
msgstr "&Belopp:"
|
||||
|
||||
#: ../../../uibase.cpp:630
|
||||
msgid "T&ransfer:"
|
||||
msgstr "&Överföring:"
|
||||
|
||||
#: ../../../uibase.cpp:636
|
||||
msgid " Standard"
|
||||
msgstr " Standard"
|
||||
|
||||
#: ../../../uibase.cpp:663
|
||||
msgid "&Send"
|
||||
msgstr "&Skicka"
|
||||
|
||||
#: ../../../uibase.cpp:711
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Ansluter..."
|
||||
|
||||
#: ../../../uibase.cpp:761
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
|
||||
msgstr "Dessa är dina Bitcoin adresser för mottagning av betalningar. Du rekommenderas att ge olika till varje avsändare så du kan ha koll på vem som betalar dig. Den markerade adressen visas i huvudfönstret."
|
||||
|
||||
#: ../../../uibase.cpp:774
|
||||
#: ../../../uibase.cpp:886
|
||||
msgid "&Edit..."
|
||||
msgstr "&Redigera..."
|
||||
|
||||
#: ../../../uibase.cpp:777
|
||||
#: ../../../uibase.cpp:889
|
||||
msgid " &New Address... "
|
||||
msgstr " &Ny Adress... "
|
||||
|
||||
#: ../../../uibase.cpp:849
|
||||
msgid "Sending"
|
||||
msgstr "Skickar"
|
||||
|
||||
#: ../../../uibase.cpp:857
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
|
||||
msgstr "Dessa är dina Bitcoin adresser för mottagning av betalningar. Du kan ge olika till varje avsändare så du kan ha koll på vem som betalar dig. Den markerade adressen visas i huvudfönstret."
|
||||
|
||||
#: ../../../uibase.cpp:870
|
||||
msgid "Receiving"
|
||||
msgstr "Mottagning"
|
||||
|
||||
#: ../../../uibase.cpp:880
|
||||
msgid "&Delete"
|
||||
msgstr "&Ta bort"
|
||||
|
||||
#: ../../../util.cpp:874
|
||||
msgid "Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."
|
||||
msgstr "Varning: Var god och kolla att din dator har rätt datum och klockslag. Om din klocka är fel så kommer Bitcoin inte att fungera ordentligt."
|
||||
|
||||
#: ../../../util.cpp:908
|
||||
msgid "beta"
|
||||
msgstr "beta"
|
||||
|
||||
#: ../../../wallet.cpp:917
|
||||
#, c-format
|
||||
msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "
|
||||
msgstr "Fel: Denna transaktion kräver en transaktionsavgift minst %s för dess belopp, komplexitet, eller användning av nyligen mottagna pengar "
|
||||
|
||||
#: ../../../wallet.cpp:919
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "Fel: Misslyckades att skapa transaktion "
|
||||
|
||||
#: ../../../wallet.cpp:928
|
||||
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "Fel: Transaktionen blev nekad. Detta kan hända om några av dina mynt i din plånbok var redan spenderad. Till exempel om du använde en kopia av wallet.dat och mynten var redan spenderad i kopian, men som inte var markerad som spenderad här."
|
||||
|
||||
#: ../../../wallet.cpp:941
|
||||
msgid "Invalid amount"
|
||||
msgstr "Ogiltig belopp"
|
||||
|
||||
#: ../../../wallet.cpp:948
|
||||
msgid "Invalid bitcoin address"
|
||||
msgstr "Ogiltig bitcoin adress"
|
||||
|
||||
#: ../../../uibase.h:147
|
||||
msgid "Transaction Details"
|
||||
msgstr "Transaktion detaljer"
|
||||
|
||||
#: ../../../uibase.h:199
|
||||
msgid "Options"
|
||||
msgstr "Inställningar"
|
||||
|
||||
#: ../../../uibase.h:228
|
||||
msgid "About Bitcoin"
|
||||
msgstr "Om Bitcoin"
|
||||
|
||||
#: ../../../uibase.h:337
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "Dina Bitcoin Adresser"
|
||||
|
||||
BIN
locale/zh_cn/LC_MESSAGES/bitcoin.mo
Normal file
967
locale/zh_cn/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,967 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-05-21 14:19+0800\n"
|
||||
"PO-Revision-Date: 2011-05-28 17:08+0800\n"
|
||||
"Last-Translator: Dean Lee <xslidian@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Language: zh_CN\n"
|
||||
"X-Source-Language: C\n"
|
||||
"X-Poedit-Bookmarks: 77,-1,-1,-1,-1,-1,-1,-1,-1,-1\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../src/init.cpp:142
|
||||
msgid "Bitcoin version"
|
||||
msgstr "Bitcoin 版本"
|
||||
|
||||
#: ../../../src/init.cpp:143
|
||||
msgid "Usage:"
|
||||
msgstr "用法:"
|
||||
|
||||
#: ../../../src/init.cpp:145
|
||||
msgid "Send command to -server or bitcoind\n"
|
||||
msgstr "发送命令给 -server 或 bitcoin\n"
|
||||
|
||||
#: ../../../src/init.cpp:146
|
||||
msgid "List commands\n"
|
||||
msgstr "列出命令\n"
|
||||
|
||||
#: ../../../src/init.cpp:147
|
||||
msgid "Get help for a command\n"
|
||||
msgstr "获取命令的帮助\n"
|
||||
|
||||
#: ../../../src/init.cpp:148
|
||||
msgid "Options:\n"
|
||||
msgstr "选项:\n"
|
||||
|
||||
#: ../../../src/init.cpp:149
|
||||
msgid "Specify configuration file (default: bitcoin.conf)\n"
|
||||
msgstr "指定配置文件 (默认: bitcoin.conf)\n"
|
||||
|
||||
#: ../../../src/init.cpp:150
|
||||
msgid "Specify pid file (default: bitcoind.pid)\n"
|
||||
msgstr "指定 pid 文件 (默认: bitcoin.pid)\n"
|
||||
|
||||
#: ../../../src/init.cpp:151
|
||||
msgid "Generate coins\n"
|
||||
msgstr "生成货币\n"
|
||||
|
||||
#: ../../../src/init.cpp:152
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "不要生成货币\n"
|
||||
|
||||
#: ../../../src/init.cpp:153
|
||||
msgid "Start minimized\n"
|
||||
msgstr "启动时最小化\n"
|
||||
|
||||
#: ../../../src/init.cpp:154
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "指定数据目录\n"
|
||||
|
||||
#: ../../../src/init.cpp:155
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
msgstr "通过 socks4 代理连接\n"
|
||||
|
||||
#: ../../../src/init.cpp:156
|
||||
msgid "Allow DNS lookups for addnode and connect\n"
|
||||
msgstr "允许 DNS 查找新增结点和连接\n"
|
||||
|
||||
#: ../../../src/init.cpp:157
|
||||
msgid "Add a node to connect to\n"
|
||||
msgstr "添加一个连接结点\n"
|
||||
|
||||
#: ../../../src/init.cpp:158
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "只连接特定结点\n"
|
||||
|
||||
#: ../../../src/init.cpp:159
|
||||
msgid "Don't accept connections from outside\n"
|
||||
msgstr "不要接受外部传来的连接\n"
|
||||
|
||||
#: ../../../src/init.cpp:162
|
||||
msgid "Don't attempt to use UPnP to map the listening port\n"
|
||||
msgstr "不要尝试使用 UPnP 映射监听端口\n"
|
||||
|
||||
#: ../../../src/init.cpp:164
|
||||
msgid "Attempt to use UPnP to map the listening port\n"
|
||||
msgstr "尝试使用 UPnP 映射监听端口\n"
|
||||
|
||||
#: ../../../src/init.cpp:167
|
||||
msgid "Fee per KB to add to transactions you send\n"
|
||||
msgstr "您为每 KB 支付所增加的交易佣金\n"
|
||||
|
||||
#: ../../../src/init.cpp:169
|
||||
msgid "Accept command line and JSON-RPC commands\n"
|
||||
msgstr "允许命令行和 JSON-RPC 控制\n"
|
||||
|
||||
#: ../../../src/init.cpp:172
|
||||
msgid "Run in the background as a daemon and accept commands\n"
|
||||
msgstr "在后台运行并接收命令\n"
|
||||
|
||||
#: ../../../src/init.cpp:174
|
||||
msgid "Use the test network\n"
|
||||
msgstr "使用测试网络\n"
|
||||
|
||||
#: ../../../src/init.cpp:175
|
||||
msgid "Username for JSON-RPC connections\n"
|
||||
msgstr "JSON-RPC 连接的用户名\n"
|
||||
|
||||
#: ../../../src/init.cpp:176
|
||||
msgid "Password for JSON-RPC connections\n"
|
||||
msgstr "JSON-RPC 连接的密码\n"
|
||||
|
||||
#: ../../../src/init.cpp:177
|
||||
msgid "Listen for JSON-RPC connections on <port> (default: 8332)\n"
|
||||
msgstr "在端口 <port> 监听 JSON-RPC 连接 (默认: 8332)\n"
|
||||
|
||||
#: ../../../src/init.cpp:178
|
||||
msgid "Allow JSON-RPC connections from specified IP address\n"
|
||||
msgstr "允许来自特定 IP 地址的 JSON-RPC 连接\n"
|
||||
|
||||
#: ../../../src/init.cpp:179
|
||||
msgid "Send commands to node running on <ip> (default: 127.0.0.1)\n"
|
||||
msgstr "发送命令给运行的结点,IP 地址 <ip> (默认: 127.0.0.1)\n"
|
||||
|
||||
#: ../../../src/init.cpp:180
|
||||
msgid "Set key pool size to <n> (default: 100)\n"
|
||||
msgstr "设置密钥池大小为 <n> (默认: 100)\n"
|
||||
|
||||
#: ../../../src/init.cpp:181
|
||||
msgid "Rescan the block chain for missing wallet transactions\n"
|
||||
msgstr "重新扫描货币包链来检测丢失的货币交易\n"
|
||||
|
||||
#: ../../../src/init.cpp:185
|
||||
msgid ""
|
||||
"\n"
|
||||
"SSL options: (see the Bitcoin Wiki for SSL setup instructions)\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"SSL 选项: (SSL 设置步骤请参见 Bitcoin Wiki)\n"
|
||||
|
||||
#: ../../../src/init.cpp:186
|
||||
msgid "Use OpenSSL (https) for JSON-RPC connections\n"
|
||||
msgstr "使用 OpenSSL (https) 进行 JSON-RPC 连接\n"
|
||||
|
||||
#: ../../../src/init.cpp:187
|
||||
msgid "Server certificate file (default: server.cert)\n"
|
||||
msgstr "服务器证书 (默认: server.cert)\n"
|
||||
|
||||
#: ../../../src/init.cpp:188
|
||||
msgid "Server private key (default: server.pem)\n"
|
||||
msgstr "服务器私有密钥 (默认: server.pem)\n"
|
||||
|
||||
#: ../../../src/init.cpp:189
|
||||
msgid "Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
msgstr "许可密码 (默认: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n"
|
||||
|
||||
#: ../../../src/init.cpp:193
|
||||
msgid "This help message\n"
|
||||
msgstr "本帮助信息\n"
|
||||
|
||||
#: ../../../src/init.cpp:330
|
||||
#, c-format
|
||||
msgid "Cannot obtain a lock on data directory %s. Bitcoin is probably already running."
|
||||
msgstr "无法获取数据目录 %s 的锁。 Bitcoin 可能已经启动。"
|
||||
|
||||
#: ../../../src/init.cpp:356
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "加载 addr.dat 出错 \n"
|
||||
|
||||
#: ../../../src/init.cpp:362
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "加载 blkindex.dat 出错 \n"
|
||||
|
||||
#: ../../../src/init.cpp:369
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "加载 wallet.dat 出错 \n"
|
||||
|
||||
#: ../../../src/init.cpp:449
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "无效 -proxy 地址"
|
||||
|
||||
#: ../../../src/init.cpp:472
|
||||
msgid "Invalid amount for -paytxfee=<amount>"
|
||||
msgstr "无效的金额 -paytxfee=<amount>"
|
||||
|
||||
#: ../../../src/init.cpp:476
|
||||
msgid "Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."
|
||||
msgstr "警告: -paytxfee 设置得过高。 这个参数是您发送一笔交易要支付的佣金。"
|
||||
|
||||
#: ../../../src/main.cpp:1866
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "警告: 磁盘空间不足"
|
||||
|
||||
#: ../../../src/main.cpp:3990
|
||||
#, c-format
|
||||
msgid "Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "
|
||||
msgstr "错误: 这个交易因为近期收到支付的数量,难度或者使用而需要支付至少 %s 交易佣金 "
|
||||
|
||||
#: ../../../src/main.cpp:3992
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "错误: 交易创建失败"
|
||||
|
||||
#: ../../../src/main.cpp:3997
|
||||
#: ../../../src/ui.cpp:1927
|
||||
#: ../../../src/ui.cpp:1932
|
||||
#: ../../../src/ui.cpp:2076
|
||||
#: ../../../src/ui.cpp:2229
|
||||
msgid "Sending..."
|
||||
msgstr "正在发送..."
|
||||
|
||||
#: ../../../src/main.cpp:4001
|
||||
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "错误: 交易被拒绝。 这可能是因为您账户里的一些货币应经被使用,比如您使用了一个复制的 wallet.dat 文件,一些货币在另一个复件里支付了但是没有在这里更新。"
|
||||
|
||||
#: ../../../src/main.cpp:4014
|
||||
msgid "Invalid amount"
|
||||
msgstr "无效金额"
|
||||
|
||||
#: ../../../src/main.cpp:4016
|
||||
#: ../../../src/ui.cpp:2143
|
||||
#: ../../../src/ui.cpp:2214
|
||||
msgid "Insufficient funds"
|
||||
msgstr "余额不足"
|
||||
|
||||
#: ../../../src/main.cpp:4021
|
||||
msgid "Invalid bitcoin address"
|
||||
msgstr "无效 bitcoin 地址"
|
||||
|
||||
#: ../../../src/net.cpp:1503
|
||||
#, c-format
|
||||
msgid "Unable to bind to port %d on this computer. Bitcoin is probably already running."
|
||||
msgstr "无法在这台电脑上绑定 %d 端口。 Bitcoin 可能已经在运行。"
|
||||
|
||||
#: ../../../src/rpc.cpp:1802
|
||||
#: ../../../src/rpc.cpp:1804
|
||||
#, c-format
|
||||
msgid "To use the %s option"
|
||||
msgstr "使用 %s 选项"
|
||||
|
||||
#: ../../../src/rpc.cpp:1806
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Warning: %s, you must set rpcpassword=<password>\n"
|
||||
"in the configuration file: %s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions.\n"
|
||||
msgstr ""
|
||||
"警告: %s,您必须在配置文件中设置 rpcpassword=<password>\n"
|
||||
"配置文件为: %s\n"
|
||||
"如果文件不存在,请创建文件并只给创建者提供只读访问权限。\n"
|
||||
|
||||
#: ../../../src/rpc.cpp:1974
|
||||
#, c-format
|
||||
msgid ""
|
||||
"You must set rpcpassword=<password> in the configuration file:\n"
|
||||
"%s\n"
|
||||
"If the file does not exist, create it with owner-readable-only file permissions."
|
||||
msgstr ""
|
||||
"您必须在配置文件中设置 rpcpassword=<password> :\n"
|
||||
"%s\n"
|
||||
"如果文件不存在,请创建文件并只给创建者提供只读访问权限。"
|
||||
|
||||
#: ../../../src/ui.cpp:204
|
||||
#, c-format
|
||||
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
|
||||
msgstr "这笔交易超过了大小限制。 您依然可以通过支付 %s 的佣金来进行,佣金用来支付为您的交易计算的结点来帮助支撑网络。 您是否要支付佣金?"
|
||||
|
||||
#: ../../../src/ui.cpp:303
|
||||
msgid "Status"
|
||||
msgstr "状态"
|
||||
|
||||
#: ../../../src/ui.cpp:304
|
||||
msgid "Date"
|
||||
msgstr "日期"
|
||||
|
||||
#: ../../../src/ui.cpp:305
|
||||
msgid "Description"
|
||||
msgstr "描述"
|
||||
|
||||
#: ../../../src/ui.cpp:306
|
||||
msgid "Debit"
|
||||
msgstr "付款人"
|
||||
|
||||
#: ../../../src/ui.cpp:307
|
||||
msgid "Credit"
|
||||
msgstr "信用"
|
||||
|
||||
#: ../../../src/ui.cpp:513
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "%d 个货币包开放"
|
||||
|
||||
#: ../../../src/ui.cpp:515
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "开放直到 %s"
|
||||
|
||||
#: ../../../src/ui.cpp:521
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/离线?"
|
||||
|
||||
#: ../../../src/ui.cpp:523
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/未确认"
|
||||
|
||||
#: ../../../src/ui.cpp:525
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d 确认"
|
||||
|
||||
#: ../../../src/ui.cpp:610
|
||||
msgid "Generated"
|
||||
msgstr "已生成"
|
||||
|
||||
#: ../../../src/ui.cpp:618
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "已生成 (%s 成熟 %d 新增货币包)"
|
||||
|
||||
#: ../../../src/ui.cpp:622
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "已生成 - 警告: 这个货币包没有被任何其他结点收到,因此很可能不会被接受!"
|
||||
|
||||
#: ../../../src/ui.cpp:626
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "已生成 (未被接受)"
|
||||
|
||||
#: ../../../src/ui.cpp:636
|
||||
msgid "From: "
|
||||
msgstr "来自: "
|
||||
|
||||
#: ../../../src/ui.cpp:660
|
||||
msgid "Received with: "
|
||||
msgstr "伴随接收: "
|
||||
|
||||
#: ../../../src/ui.cpp:706
|
||||
msgid "Payment to yourself"
|
||||
msgstr "支付给您自己"
|
||||
|
||||
#: ../../../src/ui.cpp:740
|
||||
msgid "To: "
|
||||
msgstr "到: "
|
||||
|
||||
#: ../../../src/ui.cpp:1055
|
||||
msgid " Generating"
|
||||
msgstr " 生成中"
|
||||
|
||||
#: ../../../src/ui.cpp:1057
|
||||
msgid "(not connected)"
|
||||
msgstr "(未连接)"
|
||||
|
||||
#: ../../../src/ui.cpp:1060
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d 个连接 %d 个货币包 %d 个交易 "
|
||||
|
||||
#: ../../../src/ui.cpp:1165
|
||||
#: ../../../src/ui.cpp:2529
|
||||
msgid "New Receiving Address"
|
||||
msgstr "新建接收地址"
|
||||
|
||||
#: ../../../src/ui.cpp:1166
|
||||
#: ../../../src/ui.cpp:2530
|
||||
msgid ""
|
||||
"You should use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"您应该为您收到的每次付款使用不同的地址。\n"
|
||||
"\n"
|
||||
"标签"
|
||||
|
||||
#: ../../../src/ui.cpp:1235
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>状态:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1240
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ",尚未被成功广播"
|
||||
|
||||
#: ../../../src/ui.cpp:1242
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ",通过 %d 个结点广播"
|
||||
|
||||
#: ../../../src/ui.cpp:1244
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ",通过 %d 个结点广播"
|
||||
|
||||
#: ../../../src/ui.cpp:1248
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>日期:</b>"
|
||||
|
||||
#: ../../../src/ui.cpp:1256
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>来源:</b> 生成<br>"
|
||||
|
||||
#: ../../../src/ui.cpp:1262
|
||||
#: ../../../src/ui.cpp:1280
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>从:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1280
|
||||
msgid "unknown"
|
||||
msgstr "未知"
|
||||
|
||||
#: ../../../src/ui.cpp:1281
|
||||
#: ../../../src/ui.cpp:1305
|
||||
#: ../../../src/ui.cpp:1364
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>到:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1284
|
||||
msgid " (yours, label: "
|
||||
msgstr " (您的标签: "
|
||||
|
||||
#: ../../../src/ui.cpp:1286
|
||||
msgid " (yours)"
|
||||
msgstr " (您的)"
|
||||
|
||||
#: ../../../src/ui.cpp:1323
|
||||
#: ../../../src/ui.cpp:1335
|
||||
#: ../../../src/ui.cpp:1381
|
||||
#: ../../../src/ui.cpp:1398
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr "<b>信用:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1325
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s 收获在 %d 更多的货币包)"
|
||||
|
||||
#: ../../../src/ui.cpp:1327
|
||||
msgid "(not accepted)"
|
||||
msgstr "(未被接受)"
|
||||
|
||||
#: ../../../src/ui.cpp:1372
|
||||
#: ../../../src/ui.cpp:1380
|
||||
#: ../../../src/ui.cpp:1395
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr "<b>付款人:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1386
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>交易佣金:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1402
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>网络金额:</b> "
|
||||
|
||||
#: ../../../src/ui.cpp:1409
|
||||
msgid "Message:"
|
||||
msgstr "消息:"
|
||||
|
||||
#: ../../../src/ui.cpp:1411
|
||||
msgid "Comment:"
|
||||
msgstr "评论"
|
||||
|
||||
#: ../../../src/ui.cpp:1414
|
||||
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
|
||||
msgstr "生成的货币必须等待 120 个货币包之后才能够使用。 当您生成了一个货币包后,它被广播给网络来加入货币包链中。 如果它无法加入货币包链中,他将会标记为\"不被接受\"且不能被支付。 这种情况可能因为在您生成这个货币包之后的几秒钟内有别人也生成了货币包而发生。"
|
||||
|
||||
#: ../../../src/ui.cpp:1594
|
||||
msgid "Cannot write autostart/bitcoin.desktop file"
|
||||
msgstr "无法写入 autostart/bitcoin.desktop 文件"
|
||||
|
||||
#: ../../../src/ui.cpp:1630
|
||||
msgid "Main"
|
||||
msgstr "主要"
|
||||
|
||||
#: ../../../src/ui.cpp:1638
|
||||
msgid "&Start Bitcoin on window system startup"
|
||||
msgstr "开机自动启动 Bitcoin(&S)"
|
||||
|
||||
#: ../../../src/ui.cpp:1645
|
||||
msgid "&Minimize on close"
|
||||
msgstr "关闭时最小化(&M)"
|
||||
|
||||
#: ../../../src/ui.cpp:1787
|
||||
#, c-format
|
||||
msgid "version %s"
|
||||
msgstr "版本 %s"
|
||||
|
||||
#: ../../../src/ui.cpp:1899
|
||||
msgid "Error in amount "
|
||||
msgstr "金额有误 "
|
||||
|
||||
#: ../../../src/ui.cpp:1899
|
||||
#: ../../../src/ui.cpp:1904
|
||||
#: ../../../src/ui.cpp:1909
|
||||
#: ../../../src/ui.cpp:1944
|
||||
#: ../../../src/uibase.cpp:55
|
||||
msgid "Send Coins"
|
||||
msgstr "发送货币"
|
||||
|
||||
#: ../../../src/ui.cpp:1904
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "金额超出您的账户余额"
|
||||
|
||||
#: ../../../src/ui.cpp:1909
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "总费用超出您的账户余额当 "
|
||||
|
||||
#: ../../../src/ui.cpp:1909
|
||||
msgid " transaction fee is included "
|
||||
msgstr " 交易佣金已包括"
|
||||
|
||||
#: ../../../src/ui.cpp:1927
|
||||
msgid "Payment sent "
|
||||
msgstr "付款已发送"
|
||||
|
||||
#: ../../../src/ui.cpp:1944
|
||||
msgid "Invalid address "
|
||||
msgstr "无效地址 "
|
||||
|
||||
#: ../../../src/ui.cpp:1997
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "发送 %s 给 %s"
|
||||
|
||||
#: ../../../src/ui.cpp:2070
|
||||
#: ../../../src/ui.cpp:2103
|
||||
msgid "CANCELLED"
|
||||
msgstr "已取消"
|
||||
|
||||
#: ../../../src/ui.cpp:2074
|
||||
msgid "Cancelled"
|
||||
msgstr "已取消"
|
||||
|
||||
#: ../../../src/ui.cpp:2076
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "传输已取消 "
|
||||
|
||||
#: ../../../src/ui.cpp:2129
|
||||
msgid "Error: "
|
||||
msgstr "错误: "
|
||||
|
||||
#: ../../../src/ui.cpp:2148
|
||||
msgid "Connecting..."
|
||||
msgstr "正在连接..."
|
||||
|
||||
#: ../../../src/ui.cpp:2153
|
||||
msgid "Unable to connect"
|
||||
msgstr "无法连接"
|
||||
|
||||
#: ../../../src/ui.cpp:2158
|
||||
msgid "Requesting public key..."
|
||||
msgstr "正在请求公共密钥..."
|
||||
|
||||
#: ../../../src/ui.cpp:2170
|
||||
msgid "Received public key..."
|
||||
msgstr "收到公共密钥..."
|
||||
|
||||
#: ../../../src/ui.cpp:2184
|
||||
msgid "Recipient is not accepting transactions sent by IP address"
|
||||
msgstr "收款人不接受来自 IP 地址的交易"
|
||||
|
||||
#: ../../../src/ui.cpp:2186
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "传输没有被接受"
|
||||
|
||||
#: ../../../src/ui.cpp:2195
|
||||
msgid "Invalid response received"
|
||||
msgstr "接收到无效回复"
|
||||
|
||||
#: ../../../src/ui.cpp:2210
|
||||
msgid "Creating transaction..."
|
||||
msgstr "正在创建交易..."
|
||||
|
||||
#: ../../../src/ui.cpp:2222
|
||||
#, c-format
|
||||
msgid "This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds"
|
||||
msgstr "这笔交易因为它最近收到的付款的数量,交易难度或者使用情况,需要至少 %s 交易佣金"
|
||||
|
||||
#: ../../../src/ui.cpp:2224
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "交易创建失败"
|
||||
|
||||
#: ../../../src/ui.cpp:2231
|
||||
msgid "Transaction aborted"
|
||||
msgstr "交易中止"
|
||||
|
||||
#: ../../../src/ui.cpp:2239
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "失去连接,交易已取消"
|
||||
|
||||
#: ../../../src/ui.cpp:2255
|
||||
msgid "Sending payment..."
|
||||
msgstr "正在发送付款..."
|
||||
|
||||
#: ../../../src/ui.cpp:2261
|
||||
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
|
||||
msgstr "交易被拒绝。 这可能是因为您账户中的一部分货币已经被使用,比如您使用了一个复制的 wallet.dat 文件,而且货币在另一个副本里使用但没有在这里标记。"
|
||||
|
||||
#: ../../../src/ui.cpp:2270
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "正在等待确认..."
|
||||
|
||||
#: ../../../src/ui.cpp:2288
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"The transaction is recorded and will credit to the recipient,\n"
|
||||
"but the comment information will be blank."
|
||||
msgstr ""
|
||||
"付款已发送,但是收款人无法进行确认。\n"
|
||||
"交易已经被记录,并且支付给收款人,\n"
|
||||
"但是评论信息可能是空的。"
|
||||
|
||||
#: ../../../src/ui.cpp:2297
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "支付已发送,但是收到无效回复"
|
||||
|
||||
#: ../../../src/ui.cpp:2303
|
||||
msgid "Payment completed"
|
||||
msgstr "付款完成"
|
||||
|
||||
#: ../../../src/ui.cpp:2334
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2517
|
||||
msgid "Name"
|
||||
msgstr "姓名"
|
||||
|
||||
#: ../../../src/ui.cpp:2335
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2517
|
||||
msgid "Address"
|
||||
msgstr "地址"
|
||||
|
||||
#: ../../../src/ui.cpp:2337
|
||||
#: ../../../src/ui.cpp:2492
|
||||
msgid "Label"
|
||||
msgstr "标签"
|
||||
|
||||
#: ../../../src/ui.cpp:2338
|
||||
#: ../../../src/uibase.cpp:837
|
||||
msgid "Bitcoin Address"
|
||||
msgstr "Bitcoin 地址"
|
||||
|
||||
#: ../../../src/ui.cpp:2462
|
||||
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
|
||||
msgstr "这是您拥有的接收付款的地址之一,它不能够进入这个地址簿。 "
|
||||
|
||||
#: ../../../src/ui.cpp:2480
|
||||
#: ../../../src/ui.cpp:2486
|
||||
msgid "Edit Address"
|
||||
msgstr "编辑地址"
|
||||
|
||||
#: ../../../src/ui.cpp:2492
|
||||
msgid "Edit Address Label"
|
||||
msgstr "编辑地址标签"
|
||||
|
||||
#: ../../../src/ui.cpp:2517
|
||||
#: ../../../src/ui.cpp:2523
|
||||
msgid "Add Address"
|
||||
msgstr "添加地址"
|
||||
|
||||
#: ../../../src/ui.cpp:2600
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../src/ui.cpp:2602
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - 生成中"
|
||||
|
||||
#: ../../../src/ui.cpp:2604
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (未连接)"
|
||||
|
||||
#: ../../../src/ui.cpp:2683
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "打开 Bitcoin(&O)"
|
||||
|
||||
#: ../../../src/ui.cpp:2684
|
||||
msgid "&Send Bitcoins"
|
||||
msgstr "发送 Bitcoins(&S)"
|
||||
|
||||
#: ../../../src/ui.cpp:2685
|
||||
msgid "O&ptions..."
|
||||
msgstr "选项(&P)..."
|
||||
|
||||
#: ../../../src/ui.cpp:2688
|
||||
#: ../../../src/uibase.cpp:25
|
||||
msgid "E&xit"
|
||||
msgstr "退出(&X)"
|
||||
|
||||
#: ../../../src/ui.cpp:2904
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "程序崩溃,即将关闭。 "
|
||||
|
||||
#: ../../../src/uibase.cpp:28
|
||||
msgid "&File"
|
||||
msgstr "文件(&F)"
|
||||
|
||||
#: ../../../src/uibase.cpp:32
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "您的接收地址(&Y)..."
|
||||
|
||||
#: ../../../src/uibase.cpp:36
|
||||
msgid "&Options..."
|
||||
msgstr "选项(&O)..."
|
||||
|
||||
#: ../../../src/uibase.cpp:39
|
||||
msgid "&Settings"
|
||||
msgstr "设置(&S)"
|
||||
|
||||
#: ../../../src/uibase.cpp:43
|
||||
msgid "&About..."
|
||||
msgstr "关于(&A)..."
|
||||
|
||||
#: ../../../src/uibase.cpp:46
|
||||
msgid "&Help"
|
||||
msgstr "帮助(&H)"
|
||||
|
||||
#: ../../../src/uibase.cpp:56
|
||||
msgid "Address Book"
|
||||
msgstr "地址簿"
|
||||
|
||||
#: ../../../src/uibase.cpp:69
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "您的 Bitcoin 地址:"
|
||||
|
||||
#: ../../../src/uibase.cpp:76
|
||||
msgid " &New... "
|
||||
msgstr " 新建(&N)... "
|
||||
|
||||
#: ../../../src/uibase.cpp:79
|
||||
#: ../../../src/uibase.cpp:780
|
||||
#: ../../../src/uibase.cpp:883
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr " 复制到剪贴板(&C)"
|
||||
|
||||
#: ../../../src/uibase.cpp:93
|
||||
msgid "Balance:"
|
||||
msgstr "账户余额:"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " All"
|
||||
msgstr "全部"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Sent"
|
||||
msgstr " 已发送"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " Received"
|
||||
msgstr " 已接收"
|
||||
|
||||
#: ../../../src/uibase.cpp:109
|
||||
msgid " In Progress"
|
||||
msgstr "处理中"
|
||||
|
||||
#: ../../../src/uibase.cpp:130
|
||||
msgid "All Transactions"
|
||||
msgstr "所有交易"
|
||||
|
||||
#: ../../../src/uibase.cpp:141
|
||||
msgid "Sent/Received"
|
||||
msgstr "已发送/已接收"
|
||||
|
||||
#: ../../../src/uibase.cpp:152
|
||||
msgid "Sent"
|
||||
msgstr "已发送"
|
||||
|
||||
#: ../../../src/uibase.cpp:163
|
||||
msgid "Received"
|
||||
msgstr "已接收"
|
||||
|
||||
#: ../../../src/uibase.cpp:302
|
||||
#: ../../../src/uibase.cpp:443
|
||||
#: ../../../src/uibase.cpp:542
|
||||
#: ../../../src/uibase.cpp:722
|
||||
#: ../../../src/uibase.cpp:783
|
||||
#: ../../../src/uibase.cpp:892
|
||||
#: ../../../src/uibase.cpp:981
|
||||
msgid "OK"
|
||||
msgstr "确定"
|
||||
|
||||
#: ../../../src/uibase.cpp:345
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
msgstr "开机自动启动(&S)"
|
||||
|
||||
#: ../../../src/uibase.cpp:348
|
||||
msgid "&Minimize to the tray instead of the taskbar"
|
||||
msgstr "最小化到系统托盘(&M)"
|
||||
|
||||
#: ../../../src/uibase.cpp:351
|
||||
msgid "Map port using &UPnP"
|
||||
msgstr "使用 &UPnP 映射端口"
|
||||
|
||||
#: ../../../src/uibase.cpp:354
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "关闭时最小化到托盘(&I)"
|
||||
|
||||
#: ../../../src/uibase.cpp:360
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "通过 socks4 代理连接(&C): "
|
||||
|
||||
#: ../../../src/uibase.cpp:371
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "代理服务器(&I):"
|
||||
|
||||
#: ../../../src/uibase.cpp:379
|
||||
msgid " &Port:"
|
||||
msgstr " 端口(&P):"
|
||||
|
||||
#: ../../../src/uibase.cpp:392
|
||||
msgid "Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."
|
||||
msgstr "可以选择按照KB支付交易佣金来确保您的交易得到迅速处理。 大多数交易需要 1KB。 建议支付 0.01。"
|
||||
|
||||
#: ../../../src/uibase.cpp:399
|
||||
msgid "Pay transaction fee:"
|
||||
msgstr "支付交易佣金:"
|
||||
|
||||
#: ../../../src/uibase.cpp:420
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:424
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../src/uibase.cpp:446
|
||||
#: ../../../src/uibase.cpp:668
|
||||
#: ../../../src/uibase.cpp:727
|
||||
#: ../../../src/uibase.cpp:786
|
||||
#: ../../../src/uibase.cpp:895
|
||||
#: ../../../src/uibase.cpp:984
|
||||
msgid "Cancel"
|
||||
msgstr "取消"
|
||||
|
||||
#: ../../../src/uibase.cpp:449
|
||||
msgid "&Apply"
|
||||
msgstr "应用(&A)"
|
||||
|
||||
#: ../../../src/uibase.cpp:508
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin "
|
||||
|
||||
#: ../../../src/uibase.cpp:514
|
||||
msgid "version"
|
||||
msgstr "版本"
|
||||
|
||||
#: ../../../src/uibase.cpp:525
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2011 Bitcoin Developers\n"
|
||||
"\n"
|
||||
"This is experimental software.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"This product includes software developed by the OpenSSL Project for use in the \n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
|
||||
"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
|
||||
msgstr ""
|
||||
"版权所有 (c) 2009-2010 Bitcoin 开发人员\n"
|
||||
"这是一个实验软件。\n"
|
||||
"分发遵循 MIT/X11 软件许可协议,请参见附带的 license.txt 文件或访问\n"
|
||||
"http://www.opensource.org/licenses/mit-license.php。\n"
|
||||
"本产品使用了 OpenSSL Project 开发的 OpenSSL Toolkit\n"
|
||||
"(http://www.openssl.org/),以及 Eric Young(eay@cryptsoft.com)\n"
|
||||
"编写的加密软件和 Thomas Bernard 编写的 UPnP 软件。"
|
||||
|
||||
#: ../../../src/uibase.cpp:581
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
msgstr "输入 Bitcoin 地址 (比如 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"
|
||||
|
||||
#: ../../../src/uibase.cpp:595
|
||||
msgid "Pay &To:"
|
||||
msgstr "付款给(&T):"
|
||||
|
||||
#: ../../../src/uibase.cpp:610
|
||||
msgid "&Paste"
|
||||
msgstr "粘贴(&P)"
|
||||
|
||||
#: ../../../src/uibase.cpp:613
|
||||
msgid " Address &Book..."
|
||||
msgstr " 地址簿(&B)..."
|
||||
|
||||
#: ../../../src/uibase.cpp:620
|
||||
msgid "&Amount:"
|
||||
msgstr "数量(&A):"
|
||||
|
||||
#: ../../../src/uibase.cpp:630
|
||||
msgid "T&ransfer:"
|
||||
msgstr "传输(&R):"
|
||||
|
||||
#: ../../../src/uibase.cpp:636
|
||||
msgid " Standard"
|
||||
msgstr "标准"
|
||||
|
||||
#: ../../../src/uibase.cpp:663
|
||||
msgid "&Send"
|
||||
msgstr "发送(&S)"
|
||||
|
||||
#: ../../../src/uibase.cpp:711
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"正在连接..."
|
||||
|
||||
#: ../../../src/uibase.cpp:761
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
|
||||
msgstr "这些是您用来接收付款的 Bitcoin 地址。 您可能需要给每一个付款人一个不同的地址从而可以最终每一笔交易是谁支付的。 下面高亮的地址是您的主窗口正在使用的地址。"
|
||||
|
||||
#: ../../../src/uibase.cpp:774
|
||||
#: ../../../src/uibase.cpp:886
|
||||
msgid "&Edit..."
|
||||
msgstr "编辑(&E)..."
|
||||
|
||||
#: ../../../src/uibase.cpp:777
|
||||
#: ../../../src/uibase.cpp:889
|
||||
msgid " &New Address... "
|
||||
msgstr " 新建地址(&N)..."
|
||||
|
||||
#: ../../../src/uibase.cpp:849
|
||||
msgid "Sending"
|
||||
msgstr "发送人地址"
|
||||
|
||||
#: ../../../src/uibase.cpp:857
|
||||
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
|
||||
msgstr "这些是您用来接收付款的 Bitcoin 地址。 您可以给每一个付款人一个不同的地址从而可以最终每一笔交易是谁支付的。 下面高亮的地址是您的主窗口正在使用的地址。"
|
||||
|
||||
#: ../../../src/uibase.cpp:870
|
||||
msgid "Receiving"
|
||||
msgstr "我的接收地址"
|
||||
|
||||
#: ../../../src/uibase.cpp:880
|
||||
msgid "&Delete"
|
||||
msgstr "删除(&D)"
|
||||
|
||||
#: ../../../src/util.cpp:866
|
||||
msgid "Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."
|
||||
msgstr "警告: 请检查您的电脑日期和时间是否正确。 如果您的时钟不正确 Bitcoin 将无法正常工作。"
|
||||
|
||||
#: ../../../src/util.cpp:899
|
||||
msgid "beta"
|
||||
msgstr "测试版"
|
||||
|
||||
#: ../../../src/uibase.h:147
|
||||
msgid "Transaction Details"
|
||||
msgstr "交易详情"
|
||||
|
||||
#: ../../../src/uibase.h:199
|
||||
msgid "Options"
|
||||
msgstr "选项"
|
||||
|
||||
#: ../../../src/uibase.h:228
|
||||
msgid "About Bitcoin"
|
||||
msgstr "关于 Bitcoin"
|
||||
|
||||
#: ../../../src/uibase.h:337
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "您的 Bitcoin 地址"
|
||||
@@ -1,77 +0,0 @@
|
||||
# Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
INCLUDEPATHS= \
|
||||
-I"/boost" \
|
||||
-I"/db/build_unix" \
|
||||
-I"/openssl/include" \
|
||||
-I"/wxwidgets/lib/gcc_lib/mswud" \
|
||||
-I"/wxwidgets/include"
|
||||
|
||||
LIBPATHS= \
|
||||
-L"/boost/stage/lib" \
|
||||
-L"/db/build_unix" \
|
||||
-L"/openssl/out" \
|
||||
-L"/wxwidgets/lib/gcc_lib"
|
||||
|
||||
WXLIBS= \
|
||||
-l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd
|
||||
|
||||
LIBS= \
|
||||
-l libboost_system-mgw34-mt-d \
|
||||
-l libboost_filesystem-mgw34-mt-d \
|
||||
-l libboost_program_options-mgw34-mt-d \
|
||||
-l libboost_thread-mgw34-mt-d \
|
||||
-l db_cxx \
|
||||
-l eay32 \
|
||||
-l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
|
||||
|
||||
DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH
|
||||
DEBUGFLAGS=-g -D__WXDEBUG__
|
||||
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
|
||||
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
|
||||
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h
|
||||
|
||||
OBJS= \
|
||||
obj/util.o \
|
||||
obj/script.o \
|
||||
obj/db.o \
|
||||
obj/net.o \
|
||||
obj/irc.o \
|
||||
obj/main.o \
|
||||
obj/rpc.o \
|
||||
obj/init.o \
|
||||
cryptopp/obj/sha.o \
|
||||
cryptopp/obj/cpu.o
|
||||
|
||||
|
||||
all: bitcoin.exe
|
||||
|
||||
|
||||
obj/%.o: %.cpp $(HEADERS)
|
||||
g++ -c $(CFLAGS) -DGUI -o $@ $<
|
||||
|
||||
cryptopp/obj/%.o: cryptopp/%.cpp
|
||||
g++ -c $(CFLAGS) -O3 -DCRYPTOPP_X86_ASM_AVAILABLE -o $@ $<
|
||||
|
||||
obj/ui_res.o: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp rc/send16masknoshadow.bmp rc/send20.bmp rc/send20mask.bmp rc/addressbook16.bmp rc/addressbook16mask.bmp rc/addressbook20.bmp rc/addressbook20mask.bmp
|
||||
windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<
|
||||
|
||||
bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
|
||||
g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
|
||||
|
||||
|
||||
obj/nogui/%.o: %.cpp $(HEADERS)
|
||||
g++ -c $(CFLAGS) -o $@ $<
|
||||
|
||||
bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
|
||||
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
-del /Q obj\*
|
||||
-del /Q obj\nogui\*
|
||||
-del /Q cryptopp\obj\*
|
||||
-del /Q headers.h.gch
|
||||
@@ -1,74 +0,0 @@
|
||||
# Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
INCLUDEPATHS= \
|
||||
-I"/usr/local/include/wx-2.9" \
|
||||
-I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9"
|
||||
|
||||
WXLIBS= \
|
||||
-Wl,-Bstatic \
|
||||
-l wx_gtk2ud-2.9 \
|
||||
-Wl,-Bdynamic \
|
||||
-l gtk-x11-2.0 -l SM
|
||||
|
||||
# for boost 1.37, add -mt to the boost libraries
|
||||
LIBS= \
|
||||
-Wl,-Bstatic \
|
||||
-l boost_system \
|
||||
-l boost_filesystem \
|
||||
-l boost_program_options \
|
||||
-l boost_thread \
|
||||
-l db_cxx \
|
||||
-l crypto \
|
||||
-Wl,-Bdynamic \
|
||||
-l gthread-2.0
|
||||
|
||||
DEFS=-D__WXGTK__ -DNOPCH -DFOURWAYSSE2
|
||||
DEBUGFLAGS=-g -D__WXDEBUG__
|
||||
CFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
|
||||
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
|
||||
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h
|
||||
|
||||
OBJS= \
|
||||
obj/util.o \
|
||||
obj/script.o \
|
||||
obj/db.o \
|
||||
obj/net.o \
|
||||
obj/irc.o \
|
||||
obj/main.o \
|
||||
obj/rpc.o \
|
||||
obj/init.o \
|
||||
cryptopp/obj/sha.o \
|
||||
cryptopp/obj/cpu.o
|
||||
|
||||
|
||||
all: bitcoin
|
||||
|
||||
|
||||
obj/%.o: %.cpp $(HEADERS)
|
||||
g++ -c $(CFLAGS) -DGUI -o $@ $<
|
||||
|
||||
cryptopp/obj/%.o: cryptopp/%.cpp
|
||||
g++ -c $(CFLAGS) -O3 -o $@ $<
|
||||
|
||||
obj/sha256.o: sha256.cpp
|
||||
g++ -c $(CFLAGS) -msse2 -O3 -o $@ $<
|
||||
|
||||
bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha256.o
|
||||
g++ $(CFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
|
||||
|
||||
|
||||
obj/nogui/%.o: %.cpp $(HEADERS)
|
||||
g++ -c $(CFLAGS) -o $@ $<
|
||||
|
||||
bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha256.o
|
||||
g++ $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f obj/*.o
|
||||
-rm -f obj/nogui/*.o
|
||||
-rm -f cryptopp/obj/*.o
|
||||
-rm -f headers.h.gch
|
||||
34
noui.h
@@ -1,34 +0,0 @@
|
||||
// Copyright (c) 2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
inline int MyMessageBox(const string& message, const string& caption="Message", int style=4, void* parent=NULL, int x=-1, int y=-1)
|
||||
{
|
||||
printf("%s: %s\n", caption.c_str(), message.c_str());
|
||||
fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str());
|
||||
return 4;
|
||||
}
|
||||
#define wxMessageBox MyMessageBox
|
||||
|
||||
inline int ThreadSafeMessageBox(const string& message, const string& caption, int style, void* parent, int x, int y)
|
||||
{
|
||||
return MyMessageBox(message, caption, style, parent, x, y);
|
||||
}
|
||||
|
||||
inline bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, void* parent)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void CalledSetStatusBar(const string& strText, int nField)
|
||||
{
|
||||
}
|
||||
|
||||
inline void UIThreadCall(boost::function0<void> fn)
|
||||
{
|
||||
}
|
||||
|
||||
inline void MainFrameRepaint()
|
||||
{
|
||||
}
|
||||
419
sha256.cpp
@@ -1,419 +0,0 @@
|
||||
// Copyright (c) 2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <xmmintrin.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define NPAR 32
|
||||
|
||||
static const unsigned int sha256_consts[] = {
|
||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, /* 0 */
|
||||
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, /* 8 */
|
||||
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
||||
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, /* 16 */
|
||||
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, /* 24 */
|
||||
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
||||
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, /* 32 */
|
||||
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
||||
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, /* 40 */
|
||||
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, /* 48 */
|
||||
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
||||
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, /* 56 */
|
||||
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
||||
};
|
||||
|
||||
|
||||
static inline __m128i Ch(const __m128i b, const __m128i c, const __m128i d) {
|
||||
return (b & c) ^ (~b & d);
|
||||
}
|
||||
|
||||
static inline __m128i Maj(const __m128i b, const __m128i c, const __m128i d) {
|
||||
return (b & c) ^ (b & d) ^ (c & d);
|
||||
}
|
||||
|
||||
static inline __m128i ROTR(__m128i x, const int n) {
|
||||
return _mm_srli_epi32(x, n) | _mm_slli_epi32(x, 32 - n);
|
||||
}
|
||||
|
||||
static inline __m128i SHR(__m128i x, const int n) {
|
||||
return _mm_srli_epi32(x, n);
|
||||
}
|
||||
|
||||
/* SHA256 Functions */
|
||||
#define BIGSIGMA0_256(x) (ROTR((x), 2) ^ ROTR((x), 13) ^ ROTR((x), 22))
|
||||
#define BIGSIGMA1_256(x) (ROTR((x), 6) ^ ROTR((x), 11) ^ ROTR((x), 25))
|
||||
#define SIGMA0_256(x) (ROTR((x), 7) ^ ROTR((x), 18) ^ SHR((x), 3))
|
||||
#define SIGMA1_256(x) (ROTR((x), 17) ^ ROTR((x), 19) ^ SHR((x), 10))
|
||||
|
||||
static inline unsigned int store32(const __m128i x, int i) {
|
||||
union { unsigned int ret[4]; __m128i x; } box;
|
||||
box.x = x;
|
||||
return box.ret[i];
|
||||
}
|
||||
|
||||
static inline void store_epi32(const __m128i x, unsigned int *x0, unsigned int *x1, unsigned int *x2, unsigned int *x3) {
|
||||
union { unsigned int ret[4]; __m128i x; } box;
|
||||
box.x = x;
|
||||
*x0 = box.ret[3]; *x1 = box.ret[2]; *x2 = box.ret[1]; *x3 = box.ret[0];
|
||||
}
|
||||
|
||||
#define add4(x0, x1, x2, x3) _mm_add_epi32(_mm_add_epi32(_mm_add_epi32(x0, x1), x2), x3)
|
||||
#define add5(x0, x1, x2, x3, x4) _mm_add_epi32(add4(x0, x1, x2, x3), x4)
|
||||
|
||||
#define SHA256ROUND(a, b, c, d, e, f, g, h, i, w) \
|
||||
T1 = add5(h, BIGSIGMA1_256(e), Ch(e, f, g), _mm_set1_epi32(sha256_consts[i]), w); \
|
||||
d = _mm_add_epi32(d, T1); \
|
||||
h = _mm_add_epi32(T1, _mm_add_epi32(BIGSIGMA0_256(a), Maj(a, b, c)));
|
||||
|
||||
static inline void dumpreg(__m128i x, char *msg) {
|
||||
union { unsigned int ret[4]; __m128i x; } box;
|
||||
box.x = x ;
|
||||
printf("%s %08x %08x %08x %08x\n", msg, box.ret[0], box.ret[1], box.ret[2], box.ret[3]);
|
||||
}
|
||||
|
||||
#if 1
|
||||
#define dumpstate(i) printf("%s: %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", \
|
||||
__func__, store32(w0, i), store32(a, i), store32(b, i), store32(c, i), store32(d, i), store32(e, i), store32(f, i), store32(g, i), store32(h, i));
|
||||
#else
|
||||
#define dumpstate()
|
||||
#endif
|
||||
void Double_BlockSHA256(const void* pin, void* pad, const void *pre, unsigned int thash[9][NPAR], const void *init)
|
||||
{
|
||||
unsigned int* In = (unsigned int*)pin;
|
||||
unsigned int* Pad = (unsigned int*)pad;
|
||||
unsigned int* hPre = (unsigned int*)pre;
|
||||
unsigned int* hInit = (unsigned int*)init;
|
||||
unsigned int i, j, k;
|
||||
|
||||
/* vectors used in calculation */
|
||||
__m128i w0, w1, w2, w3, w4, w5, w6, w7;
|
||||
__m128i w8, w9, w10, w11, w12, w13, w14, w15;
|
||||
__m128i T1;
|
||||
__m128i a, b, c, d, e, f, g, h;
|
||||
__m128i nonce;
|
||||
|
||||
/* nonce offset for vector */
|
||||
__m128i offset = _mm_set_epi32(0x00000003, 0x00000002, 0x00000001, 0x00000000);
|
||||
|
||||
|
||||
for(k = 0; k<NPAR; k+=4) {
|
||||
w0 = _mm_set1_epi32(In[0]);
|
||||
w1 = _mm_set1_epi32(In[1]);
|
||||
w2 = _mm_set1_epi32(In[2]);
|
||||
//w3 = _mm_set1_epi32(In[3]); nonce will be later hacked into the hash
|
||||
w4 = _mm_set1_epi32(In[4]);
|
||||
w5 = _mm_set1_epi32(In[5]);
|
||||
w6 = _mm_set1_epi32(In[6]);
|
||||
w7 = _mm_set1_epi32(In[7]);
|
||||
w8 = _mm_set1_epi32(In[8]);
|
||||
w9 = _mm_set1_epi32(In[9]);
|
||||
w10 = _mm_set1_epi32(In[10]);
|
||||
w11 = _mm_set1_epi32(In[11]);
|
||||
w12 = _mm_set1_epi32(In[12]);
|
||||
w13 = _mm_set1_epi32(In[13]);
|
||||
w14 = _mm_set1_epi32(In[14]);
|
||||
w15 = _mm_set1_epi32(In[15]);
|
||||
|
||||
/* hack nonce into lowest byte of w3 */
|
||||
nonce = _mm_set1_epi32(In[3]);
|
||||
nonce = _mm_add_epi32(nonce, offset);
|
||||
nonce = _mm_add_epi32(nonce, _mm_set1_epi32(k));
|
||||
w3 = nonce;
|
||||
|
||||
a = _mm_set1_epi32(hPre[0]);
|
||||
b = _mm_set1_epi32(hPre[1]);
|
||||
c = _mm_set1_epi32(hPre[2]);
|
||||
d = _mm_set1_epi32(hPre[3]);
|
||||
e = _mm_set1_epi32(hPre[4]);
|
||||
f = _mm_set1_epi32(hPre[5]);
|
||||
g = _mm_set1_epi32(hPre[6]);
|
||||
h = _mm_set1_epi32(hPre[7]);
|
||||
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 0, w0);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 1, w1);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 2, w2);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 3, w3);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 4, w4);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 5, w5);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 6, w6);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 7, w7);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 8, w8);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 9, w9);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 10, w10);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 11, w11);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 12, w12);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 13, w13);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 14, w14);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 15, w15);
|
||||
|
||||
w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 16, w0);
|
||||
w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 17, w1);
|
||||
w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 18, w2);
|
||||
w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 19, w3);
|
||||
w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 20, w4);
|
||||
w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 21, w5);
|
||||
w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 22, w6);
|
||||
w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 23, w7);
|
||||
w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 24, w8);
|
||||
w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 25, w9);
|
||||
w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 26, w10);
|
||||
w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 27, w11);
|
||||
w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 28, w12);
|
||||
w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 29, w13);
|
||||
w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 30, w14);
|
||||
w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 31, w15);
|
||||
|
||||
w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 32, w0);
|
||||
w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 33, w1);
|
||||
w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 34, w2);
|
||||
w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 35, w3);
|
||||
w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 36, w4);
|
||||
w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 37, w5);
|
||||
w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 38, w6);
|
||||
w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 39, w7);
|
||||
w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 40, w8);
|
||||
w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 41, w9);
|
||||
w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 42, w10);
|
||||
w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 43, w11);
|
||||
w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 44, w12);
|
||||
w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 45, w13);
|
||||
w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 46, w14);
|
||||
w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 47, w15);
|
||||
|
||||
w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 48, w0);
|
||||
w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 49, w1);
|
||||
w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 50, w2);
|
||||
w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 51, w3);
|
||||
w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 52, w4);
|
||||
w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 53, w5);
|
||||
w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 54, w6);
|
||||
w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 55, w7);
|
||||
w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 56, w8);
|
||||
w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 57, w9);
|
||||
w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 58, w10);
|
||||
w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 59, w11);
|
||||
w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 60, w12);
|
||||
w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 61, w13);
|
||||
w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 62, w14);
|
||||
w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 63, w15);
|
||||
|
||||
#define store_load(x, i, dest) \
|
||||
T1 = _mm_set1_epi32((hPre)[i]); \
|
||||
dest = _mm_add_epi32(T1, x);
|
||||
|
||||
store_load(a, 0, w0);
|
||||
store_load(b, 1, w1);
|
||||
store_load(c, 2, w2);
|
||||
store_load(d, 3, w3);
|
||||
store_load(e, 4, w4);
|
||||
store_load(f, 5, w5);
|
||||
store_load(g, 6, w6);
|
||||
store_load(h, 7, w7);
|
||||
|
||||
w8 = _mm_set1_epi32(Pad[8]);
|
||||
w9 = _mm_set1_epi32(Pad[9]);
|
||||
w10 = _mm_set1_epi32(Pad[10]);
|
||||
w11 = _mm_set1_epi32(Pad[11]);
|
||||
w12 = _mm_set1_epi32(Pad[12]);
|
||||
w13 = _mm_set1_epi32(Pad[13]);
|
||||
w14 = _mm_set1_epi32(Pad[14]);
|
||||
w15 = _mm_set1_epi32(Pad[15]);
|
||||
|
||||
a = _mm_set1_epi32(hInit[0]);
|
||||
b = _mm_set1_epi32(hInit[1]);
|
||||
c = _mm_set1_epi32(hInit[2]);
|
||||
d = _mm_set1_epi32(hInit[3]);
|
||||
e = _mm_set1_epi32(hInit[4]);
|
||||
f = _mm_set1_epi32(hInit[5]);
|
||||
g = _mm_set1_epi32(hInit[6]);
|
||||
h = _mm_set1_epi32(hInit[7]);
|
||||
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 0, w0);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 1, w1);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 2, w2);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 3, w3);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 4, w4);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 5, w5);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 6, w6);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 7, w7);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 8, w8);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 9, w9);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 10, w10);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 11, w11);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 12, w12);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 13, w13);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 14, w14);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 15, w15);
|
||||
|
||||
w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 16, w0);
|
||||
w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 17, w1);
|
||||
w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 18, w2);
|
||||
w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 19, w3);
|
||||
w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 20, w4);
|
||||
w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 21, w5);
|
||||
w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 22, w6);
|
||||
w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 23, w7);
|
||||
w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 24, w8);
|
||||
w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 25, w9);
|
||||
w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 26, w10);
|
||||
w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 27, w11);
|
||||
w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 28, w12);
|
||||
w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 29, w13);
|
||||
w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 30, w14);
|
||||
w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 31, w15);
|
||||
|
||||
w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 32, w0);
|
||||
w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 33, w1);
|
||||
w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 34, w2);
|
||||
w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 35, w3);
|
||||
w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 36, w4);
|
||||
w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 37, w5);
|
||||
w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 38, w6);
|
||||
w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 39, w7);
|
||||
w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 40, w8);
|
||||
w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 41, w9);
|
||||
w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 42, w10);
|
||||
w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 43, w11);
|
||||
w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 44, w12);
|
||||
w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 45, w13);
|
||||
w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 46, w14);
|
||||
w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 47, w15);
|
||||
|
||||
w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 48, w0);
|
||||
w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 49, w1);
|
||||
w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 50, w2);
|
||||
w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 51, w3);
|
||||
w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 52, w4);
|
||||
w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 53, w5);
|
||||
w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 54, w6);
|
||||
w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 55, w7);
|
||||
w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
|
||||
SHA256ROUND(a, b, c, d, e, f, g, h, 56, w8);
|
||||
w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
|
||||
SHA256ROUND(h, a, b, c, d, e, f, g, 57, w9);
|
||||
w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
|
||||
SHA256ROUND(g, h, a, b, c, d, e, f, 58, w10);
|
||||
w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
|
||||
SHA256ROUND(f, g, h, a, b, c, d, e, 59, w11);
|
||||
w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
|
||||
SHA256ROUND(e, f, g, h, a, b, c, d, 60, w12);
|
||||
w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
|
||||
SHA256ROUND(d, e, f, g, h, a, b, c, 61, w13);
|
||||
w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
|
||||
SHA256ROUND(c, d, e, f, g, h, a, b, 62, w14);
|
||||
w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
|
||||
SHA256ROUND(b, c, d, e, f, g, h, a, 63, w15);
|
||||
|
||||
/* store resulsts directly in thash */
|
||||
#define store_2(x,i) \
|
||||
w0 = _mm_set1_epi32(hInit[i]); \
|
||||
*(__m128i *)&(thash)[i][0+k] = _mm_add_epi32(w0, x);
|
||||
|
||||
store_2(a, 0);
|
||||
store_2(b, 1);
|
||||
store_2(c, 2);
|
||||
store_2(d, 3);
|
||||
store_2(e, 4);
|
||||
store_2(f, 5);
|
||||
store_2(g, 6);
|
||||
store_2(h, 7);
|
||||
*(__m128i *)&(thash)[8][0+k] = nonce;
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
@@ -1,18 +1,15 @@
|
||||
# Auto-generated by EclipseNSIS Script Wizard
|
||||
# 3.10.2009 19:00:28
|
||||
|
||||
Name Bitcoin
|
||||
|
||||
RequestExecutionLevel highest
|
||||
|
||||
# General Symbol Definitions
|
||||
!define REGKEY "SOFTWARE\$(^Name)"
|
||||
!define VERSION 0.3.10
|
||||
!define VERSION 0.3.24
|
||||
!define COMPANY "Bitcoin project"
|
||||
!define URL http://www.bitcoin.org/
|
||||
|
||||
# MUI Symbol Definitions
|
||||
!define MUI_ICON "src\rc\bitcoin.ico"
|
||||
!define MUI_ICON "../share/pixmaps/bitcoin.ico"
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
|
||||
@@ -42,12 +39,12 @@ Var StartMenuGroup
|
||||
!insertmacro MUI_LANGUAGE English
|
||||
|
||||
# Installer attributes
|
||||
OutFile bitcoin-0.3.10-win32-setup.exe
|
||||
OutFile bitcoin-0.3.24-win32-setup.exe
|
||||
InstallDir $PROGRAMFILES\Bitcoin
|
||||
CRCCheck on
|
||||
XPStyle on
|
||||
ShowInstDetails show
|
||||
VIProductVersion 0.3.10.0
|
||||
VIProductVersion 0.3.24.0
|
||||
VIAddVersionKey ProductName Bitcoin
|
||||
VIAddVersionKey ProductVersion "${VERSION}"
|
||||
VIAddVersionKey CompanyName "${COMPANY}"
|
||||
@@ -62,17 +59,15 @@ ShowUninstDetails show
|
||||
Section -Main SEC0000
|
||||
SetOutPath $INSTDIR
|
||||
SetOverwrite on
|
||||
File bitcoin.exe
|
||||
File libeay32.dll
|
||||
File mingwm10.dll
|
||||
File license.txt
|
||||
File readme.txt
|
||||
File ../src/bitcoin.exe
|
||||
File /oname=license.txt ../COPYING
|
||||
File /oname=readme.txt ../doc/README_windows.txt
|
||||
SetOutPath $INSTDIR\daemon
|
||||
File /r daemon\*.*
|
||||
File ../src/bitcoind.exe
|
||||
SetOutPath $INSTDIR\locale
|
||||
File /r locale\*.*
|
||||
File /r ../locale/*.*
|
||||
SetOutPath $INSTDIR\src
|
||||
File /r src\*.*
|
||||
File /r /x *.exe /x *.o ../src\*.*
|
||||
SetOutPath $INSTDIR
|
||||
WriteRegStr HKCU "${REGKEY}\Components" Main 1
|
||||
SectionEnd
|
||||
@@ -112,8 +107,6 @@ done${UNSECTION_ID}:
|
||||
# Uninstaller sections
|
||||
Section /o -un.Main UNSEC0000
|
||||
Delete /REBOOTOK $INSTDIR\bitcoin.exe
|
||||
Delete /REBOOTOK $INSTDIR\libeay32.dll
|
||||
Delete /REBOOTOK $INSTDIR\mingwm10.dll
|
||||
Delete /REBOOTOK $INSTDIR\license.txt
|
||||
Delete /REBOOTOK $INSTDIR\readme.txt
|
||||
RMDir /r /REBOOTOK $INSTDIR\daemon
|
||||
15
share/ui.rc
Normal file
@@ -0,0 +1,15 @@
|
||||
bitcoin ICON "pixmaps/bitcoin.ico"
|
||||
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
check ICON "pixmaps/check.ico"
|
||||
send16 BITMAP "pixmaps/send16.bmp"
|
||||
send16mask BITMAP "pixmaps/send16mask.bmp"
|
||||
send16masknoshadow BITMAP "pixmaps/send16masknoshadow.bmp"
|
||||
send20 BITMAP "pixmaps/send20.bmp"
|
||||
send20mask BITMAP "pixmaps/send20mask.bmp"
|
||||
addressbook16 BITMAP "pixmaps/addressbook16.bmp"
|
||||
addressbook16mask BITMAP "pixmaps/addressbook16mask.bmp"
|
||||
addressbook20 BITMAP "pixmaps/addressbook20.bmp"
|
||||
addressbook20mask BITMAP "pixmaps/addressbook20mask.bmp"
|
||||
favicon ICON "pixmaps/favicon.ico"
|
||||
@@ -1,201 +1,210 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
//
|
||||
// Why base-58 instead of standard base-64 encoding?
|
||||
// - Don't want 0OIl characters that look the same in some fonts and
|
||||
// could be used to create visually identical looking account numbers.
|
||||
// - A string with non-alphanumeric characters is not as easily accepted as an account number.
|
||||
// - E-mail usually won't line-break if there's no punctuation to break at.
|
||||
// - Doubleclicking selects the whole number as one word if it's all alphanumeric.
|
||||
//
|
||||
|
||||
|
||||
static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
||||
|
||||
|
||||
inline string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend)
|
||||
{
|
||||
CAutoBN_CTX pctx;
|
||||
CBigNum bn58 = 58;
|
||||
CBigNum bn0 = 0;
|
||||
|
||||
// Convert big endian data to little endian
|
||||
// Extra zero at the end make sure bignum will interpret as a positive number
|
||||
vector<unsigned char> vchTmp(pend-pbegin+1, 0);
|
||||
reverse_copy(pbegin, pend, vchTmp.begin());
|
||||
|
||||
// Convert little endian data to bignum
|
||||
CBigNum bn;
|
||||
bn.setvch(vchTmp);
|
||||
|
||||
// Convert bignum to string
|
||||
string str;
|
||||
str.reserve((pend - pbegin) * 138 / 100 + 1);
|
||||
CBigNum dv;
|
||||
CBigNum rem;
|
||||
while (bn > bn0)
|
||||
{
|
||||
if (!BN_div(&dv, &rem, &bn, &bn58, pctx))
|
||||
throw bignum_error("EncodeBase58 : BN_div failed");
|
||||
bn = dv;
|
||||
unsigned int c = rem.getulong();
|
||||
str += pszBase58[c];
|
||||
}
|
||||
|
||||
// Leading zeroes encoded as base58 zeros
|
||||
for (const unsigned char* p = pbegin; p < pend && *p == 0; p++)
|
||||
str += pszBase58[0];
|
||||
|
||||
// Convert little endian string to big endian
|
||||
reverse(str.begin(), str.end());
|
||||
return str;
|
||||
}
|
||||
|
||||
inline string EncodeBase58(const vector<unsigned char>& vch)
|
||||
{
|
||||
return EncodeBase58(&vch[0], &vch[0] + vch.size());
|
||||
}
|
||||
|
||||
inline bool DecodeBase58(const char* psz, vector<unsigned char>& vchRet)
|
||||
{
|
||||
CAutoBN_CTX pctx;
|
||||
vchRet.clear();
|
||||
CBigNum bn58 = 58;
|
||||
CBigNum bn = 0;
|
||||
CBigNum bnChar;
|
||||
while (isspace(*psz))
|
||||
psz++;
|
||||
|
||||
// Convert big endian string to bignum
|
||||
for (const char* p = psz; *p; p++)
|
||||
{
|
||||
const char* p1 = strchr(pszBase58, *p);
|
||||
if (p1 == NULL)
|
||||
{
|
||||
while (isspace(*p))
|
||||
p++;
|
||||
if (*p != '\0')
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
bnChar.setulong(p1 - pszBase58);
|
||||
if (!BN_mul(&bn, &bn, &bn58, pctx))
|
||||
throw bignum_error("DecodeBase58 : BN_mul failed");
|
||||
bn += bnChar;
|
||||
}
|
||||
|
||||
// Get bignum as little endian data
|
||||
vector<unsigned char> vchTmp = bn.getvch();
|
||||
|
||||
// Trim off sign byte if present
|
||||
if (vchTmp.size() >= 2 && vchTmp.end()[-1] == 0 && vchTmp.end()[-2] >= 0x80)
|
||||
vchTmp.erase(vchTmp.end()-1);
|
||||
|
||||
// Restore leading zeros
|
||||
int nLeadingZeros = 0;
|
||||
for (const char* p = psz; *p == pszBase58[0]; p++)
|
||||
nLeadingZeros++;
|
||||
vchRet.assign(nLeadingZeros + vchTmp.size(), 0);
|
||||
|
||||
// Convert little endian data to big endian
|
||||
reverse_copy(vchTmp.begin(), vchTmp.end(), vchRet.end() - vchTmp.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool DecodeBase58(const string& str, vector<unsigned char>& vchRet)
|
||||
{
|
||||
return DecodeBase58(str.c_str(), vchRet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
inline string EncodeBase58Check(const vector<unsigned char>& vchIn)
|
||||
{
|
||||
// add 4-byte hash check to the end
|
||||
vector<unsigned char> vch(vchIn);
|
||||
uint256 hash = Hash(vch.begin(), vch.end());
|
||||
vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
|
||||
return EncodeBase58(vch);
|
||||
}
|
||||
|
||||
inline bool DecodeBase58Check(const char* psz, vector<unsigned char>& vchRet)
|
||||
{
|
||||
if (!DecodeBase58(psz, vchRet))
|
||||
return false;
|
||||
if (vchRet.size() < 4)
|
||||
{
|
||||
vchRet.clear();
|
||||
return false;
|
||||
}
|
||||
uint256 hash = Hash(vchRet.begin(), vchRet.end()-4);
|
||||
if (memcmp(&hash, &vchRet.end()[-4], 4) != 0)
|
||||
{
|
||||
vchRet.clear();
|
||||
return false;
|
||||
}
|
||||
vchRet.resize(vchRet.size()-4);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool DecodeBase58Check(const string& str, vector<unsigned char>& vchRet)
|
||||
{
|
||||
return DecodeBase58Check(str.c_str(), vchRet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static const unsigned char ADDRESSVERSION = 0;
|
||||
|
||||
inline string Hash160ToAddress(uint160 hash160)
|
||||
{
|
||||
// add 1-byte version number to the front
|
||||
vector<unsigned char> vch(1, ADDRESSVERSION);
|
||||
vch.insert(vch.end(), UBEGIN(hash160), UEND(hash160));
|
||||
return EncodeBase58Check(vch);
|
||||
}
|
||||
|
||||
inline bool AddressToHash160(const char* psz, uint160& hash160Ret)
|
||||
{
|
||||
vector<unsigned char> vch;
|
||||
if (!DecodeBase58Check(psz, vch))
|
||||
return false;
|
||||
if (vch.empty())
|
||||
return false;
|
||||
unsigned char nVersion = vch[0];
|
||||
if (vch.size() != sizeof(hash160Ret) + 1)
|
||||
return false;
|
||||
memcpy(&hash160Ret, &vch[1], sizeof(hash160Ret));
|
||||
return (nVersion <= ADDRESSVERSION);
|
||||
}
|
||||
|
||||
inline bool AddressToHash160(const string& str, uint160& hash160Ret)
|
||||
{
|
||||
return AddressToHash160(str.c_str(), hash160Ret);
|
||||
}
|
||||
|
||||
inline bool IsValidBitcoinAddress(const char* psz)
|
||||
{
|
||||
uint160 hash160;
|
||||
return AddressToHash160(psz, hash160);
|
||||
}
|
||||
|
||||
inline bool IsValidBitcoinAddress(const string& str)
|
||||
{
|
||||
return IsValidBitcoinAddress(str.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
inline string PubKeyToAddress(const vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
return Hash160ToAddress(Hash160(vchPubKey));
|
||||
}
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
//
|
||||
// Why base-58 instead of standard base-64 encoding?
|
||||
// - Don't want 0OIl characters that look the same in some fonts and
|
||||
// could be used to create visually identical looking account numbers.
|
||||
// - A string with non-alphanumeric characters is not as easily accepted as an account number.
|
||||
// - E-mail usually won't line-break if there's no punctuation to break at.
|
||||
// - Doubleclicking selects the whole number as one word if it's all alphanumeric.
|
||||
//
|
||||
#ifndef BITCOIN_BASE58_H
|
||||
#define BITCOIN_BASE58_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "bignum.h"
|
||||
|
||||
static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
||||
|
||||
|
||||
inline std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend)
|
||||
{
|
||||
CAutoBN_CTX pctx;
|
||||
CBigNum bn58 = 58;
|
||||
CBigNum bn0 = 0;
|
||||
|
||||
// Convert big endian data to little endian
|
||||
// Extra zero at the end make sure bignum will interpret as a positive number
|
||||
std::vector<unsigned char> vchTmp(pend-pbegin+1, 0);
|
||||
reverse_copy(pbegin, pend, vchTmp.begin());
|
||||
|
||||
// Convert little endian data to bignum
|
||||
CBigNum bn;
|
||||
bn.setvch(vchTmp);
|
||||
|
||||
// Convert bignum to std::string
|
||||
std::string str;
|
||||
// Expected size increase from base58 conversion is approximately 137%
|
||||
// use 138% to be safe
|
||||
str.reserve((pend - pbegin) * 138 / 100 + 1);
|
||||
CBigNum dv;
|
||||
CBigNum rem;
|
||||
while (bn > bn0)
|
||||
{
|
||||
if (!BN_div(&dv, &rem, &bn, &bn58, pctx))
|
||||
throw bignum_error("EncodeBase58 : BN_div failed");
|
||||
bn = dv;
|
||||
unsigned int c = rem.getulong();
|
||||
str += pszBase58[c];
|
||||
}
|
||||
|
||||
// Leading zeroes encoded as base58 zeros
|
||||
for (const unsigned char* p = pbegin; p < pend && *p == 0; p++)
|
||||
str += pszBase58[0];
|
||||
|
||||
// Convert little endian std::string to big endian
|
||||
reverse(str.begin(), str.end());
|
||||
return str;
|
||||
}
|
||||
|
||||
inline std::string EncodeBase58(const std::vector<unsigned char>& vch)
|
||||
{
|
||||
return EncodeBase58(&vch[0], &vch[0] + vch.size());
|
||||
}
|
||||
|
||||
inline bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet)
|
||||
{
|
||||
CAutoBN_CTX pctx;
|
||||
vchRet.clear();
|
||||
CBigNum bn58 = 58;
|
||||
CBigNum bn = 0;
|
||||
CBigNum bnChar;
|
||||
while (isspace(*psz))
|
||||
psz++;
|
||||
|
||||
// Convert big endian string to bignum
|
||||
for (const char* p = psz; *p; p++)
|
||||
{
|
||||
const char* p1 = strchr(pszBase58, *p);
|
||||
if (p1 == NULL)
|
||||
{
|
||||
while (isspace(*p))
|
||||
p++;
|
||||
if (*p != '\0')
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
bnChar.setulong(p1 - pszBase58);
|
||||
if (!BN_mul(&bn, &bn, &bn58, pctx))
|
||||
throw bignum_error("DecodeBase58 : BN_mul failed");
|
||||
bn += bnChar;
|
||||
}
|
||||
|
||||
// Get bignum as little endian data
|
||||
std::vector<unsigned char> vchTmp = bn.getvch();
|
||||
|
||||
// Trim off sign byte if present
|
||||
if (vchTmp.size() >= 2 && vchTmp.end()[-1] == 0 && vchTmp.end()[-2] >= 0x80)
|
||||
vchTmp.erase(vchTmp.end()-1);
|
||||
|
||||
// Restore leading zeros
|
||||
int nLeadingZeros = 0;
|
||||
for (const char* p = psz; *p == pszBase58[0]; p++)
|
||||
nLeadingZeros++;
|
||||
vchRet.assign(nLeadingZeros + vchTmp.size(), 0);
|
||||
|
||||
// Convert little endian data to big endian
|
||||
reverse_copy(vchTmp.begin(), vchTmp.end(), vchRet.end() - vchTmp.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet)
|
||||
{
|
||||
return DecodeBase58(str.c_str(), vchRet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
inline std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn)
|
||||
{
|
||||
// add 4-byte hash check to the end
|
||||
std::vector<unsigned char> vch(vchIn);
|
||||
uint256 hash = Hash(vch.begin(), vch.end());
|
||||
vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
|
||||
return EncodeBase58(vch);
|
||||
}
|
||||
|
||||
inline bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
|
||||
{
|
||||
if (!DecodeBase58(psz, vchRet))
|
||||
return false;
|
||||
if (vchRet.size() < 4)
|
||||
{
|
||||
vchRet.clear();
|
||||
return false;
|
||||
}
|
||||
uint256 hash = Hash(vchRet.begin(), vchRet.end()-4);
|
||||
if (memcmp(&hash, &vchRet.end()[-4], 4) != 0)
|
||||
{
|
||||
vchRet.clear();
|
||||
return false;
|
||||
}
|
||||
vchRet.resize(vchRet.size()-4);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet)
|
||||
{
|
||||
return DecodeBase58Check(str.c_str(), vchRet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define ADDRESSVERSION ((unsigned char)(fTestNet ? 111 : 0))
|
||||
|
||||
inline std::string Hash160ToAddress(uint160 hash160)
|
||||
{
|
||||
// add 1-byte version number to the front
|
||||
std::vector<unsigned char> vch(1, ADDRESSVERSION);
|
||||
vch.insert(vch.end(), UBEGIN(hash160), UEND(hash160));
|
||||
return EncodeBase58Check(vch);
|
||||
}
|
||||
|
||||
inline bool AddressToHash160(const char* psz, uint160& hash160Ret)
|
||||
{
|
||||
std::vector<unsigned char> vch;
|
||||
if (!DecodeBase58Check(psz, vch))
|
||||
return false;
|
||||
if (vch.empty())
|
||||
return false;
|
||||
unsigned char nVersion = vch[0];
|
||||
if (vch.size() != sizeof(hash160Ret) + 1)
|
||||
return false;
|
||||
memcpy(&hash160Ret, &vch[1], sizeof(hash160Ret));
|
||||
return (nVersion <= ADDRESSVERSION);
|
||||
}
|
||||
|
||||
inline bool AddressToHash160(const std::string& str, uint160& hash160Ret)
|
||||
{
|
||||
return AddressToHash160(str.c_str(), hash160Ret);
|
||||
}
|
||||
|
||||
inline bool IsValidBitcoinAddress(const char* psz)
|
||||
{
|
||||
uint160 hash160;
|
||||
return AddressToHash160(psz, hash160);
|
||||
}
|
||||
|
||||
inline bool IsValidBitcoinAddress(const std::string& str)
|
||||
{
|
||||
return IsValidBitcoinAddress(str.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
inline std::string PubKeyToAddress(const std::vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
return Hash160ToAddress(Hash160(vchPubKey));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,67 +1,67 @@
|
||||
Compilation Copyright (c) 1995-2009 by Wei Dai. All rights reserved.
|
||||
This copyright applies only to this software distribution package
|
||||
as a compilation, and does not imply a copyright on any particular
|
||||
file in the package.
|
||||
|
||||
The following files are copyrighted by their respective original authors,
|
||||
and their use is subject to additional licenses included in these files.
|
||||
|
||||
mars.cpp - Copyright 1998 Brian Gladman.
|
||||
|
||||
All other files in this compilation are placed in the public domain by
|
||||
Wei Dai and other contributors.
|
||||
|
||||
I would like to thank the following authors for placing their works into
|
||||
the public domain:
|
||||
|
||||
Joan Daemen - 3way.cpp
|
||||
Leonard Janke - cast.cpp, seal.cpp
|
||||
Steve Reid - cast.cpp
|
||||
Phil Karn - des.cpp
|
||||
Andrew M. Kuchling - md2.cpp, md4.cpp
|
||||
Colin Plumb - md5.cpp
|
||||
Seal Woods - rc6.cpp
|
||||
Chris Morgan - rijndael.cpp
|
||||
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
|
||||
Richard De Moliner - safer.cpp
|
||||
Matthew Skala - twofish.cpp
|
||||
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
|
||||
|
||||
Permission to use, copy, modify, and distribute this compilation for
|
||||
any purpose, including commercial applications, is hereby granted
|
||||
without fee, subject to the following restrictions:
|
||||
|
||||
1. Any copy or modification of this compilation in any form, except
|
||||
in object code form as part of an application software, must include
|
||||
the above copyright notice and this license.
|
||||
|
||||
2. Users of this software agree that any modification or extension
|
||||
they provide to Wei Dai will be considered public domain and not
|
||||
copyrighted unless it includes an explicit copyright notice.
|
||||
|
||||
3. Wei Dai makes no warranty or representation that the operation of the
|
||||
software in this compilation will be error-free, and Wei Dai is under no
|
||||
obligation to provide any services, by way of maintenance, update, or
|
||||
otherwise. THE SOFTWARE AND ANY DOCUMENTATION ARE PROVIDED "AS IS"
|
||||
WITHOUT EXPRESS OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. IN NO EVENT WILL WEI DAI OR ANY OTHER CONTRIBUTOR BE LIABLE FOR
|
||||
DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
4. Users will not use Wei Dai or any other contributor's name in any
|
||||
publicity or advertising, without prior written consent in each case.
|
||||
|
||||
5. Export of this software from the United States may require a
|
||||
specific license from the United States Government. It is the
|
||||
responsibility of any person or organization contemplating export
|
||||
to obtain such a license before exporting.
|
||||
|
||||
6. Certain parts of this software may be protected by patents. It
|
||||
is the users' responsibility to obtain the appropriate
|
||||
licenses before using those parts.
|
||||
|
||||
If this compilation is used in object code form in an application
|
||||
software, acknowledgement of the author is not required but would be
|
||||
appreciated. The contribution of any useful modifications or extensions
|
||||
to Wei Dai is not required but would also be appreciated.
|
||||
Compilation Copyright (c) 1995-2009 by Wei Dai. All rights reserved.
|
||||
This copyright applies only to this software distribution package
|
||||
as a compilation, and does not imply a copyright on any particular
|
||||
file in the package.
|
||||
|
||||
The following files are copyrighted by their respective original authors,
|
||||
and their use is subject to additional licenses included in these files.
|
||||
|
||||
mars.cpp - Copyright 1998 Brian Gladman.
|
||||
|
||||
All other files in this compilation are placed in the public domain by
|
||||
Wei Dai and other contributors.
|
||||
|
||||
I would like to thank the following authors for placing their works into
|
||||
the public domain:
|
||||
|
||||
Joan Daemen - 3way.cpp
|
||||
Leonard Janke - cast.cpp, seal.cpp
|
||||
Steve Reid - cast.cpp
|
||||
Phil Karn - des.cpp
|
||||
Andrew M. Kuchling - md2.cpp, md4.cpp
|
||||
Colin Plumb - md5.cpp
|
||||
Seal Woods - rc6.cpp
|
||||
Chris Morgan - rijndael.cpp
|
||||
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
|
||||
Richard De Moliner - safer.cpp
|
||||
Matthew Skala - twofish.cpp
|
||||
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
|
||||
|
||||
Permission to use, copy, modify, and distribute this compilation for
|
||||
any purpose, including commercial applications, is hereby granted
|
||||
without fee, subject to the following restrictions:
|
||||
|
||||
1. Any copy or modification of this compilation in any form, except
|
||||
in object code form as part of an application software, must include
|
||||
the above copyright notice and this license.
|
||||
|
||||
2. Users of this software agree that any modification or extension
|
||||
they provide to Wei Dai will be considered public domain and not
|
||||
copyrighted unless it includes an explicit copyright notice.
|
||||
|
||||
3. Wei Dai makes no warranty or representation that the operation of the
|
||||
software in this compilation will be error-free, and Wei Dai is under no
|
||||
obligation to provide any services, by way of maintenance, update, or
|
||||
otherwise. THE SOFTWARE AND ANY DOCUMENTATION ARE PROVIDED "AS IS"
|
||||
WITHOUT EXPRESS OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. IN NO EVENT WILL WEI DAI OR ANY OTHER CONTRIBUTOR BE LIABLE FOR
|
||||
DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
4. Users will not use Wei Dai or any other contributor's name in any
|
||||
publicity or advertising, without prior written consent in each case.
|
||||
|
||||
5. Export of this software from the United States may require a
|
||||
specific license from the United States Government. It is the
|
||||
responsibility of any person or organization contemplating export
|
||||
to obtain such a license before exporting.
|
||||
|
||||
6. Certain parts of this software may be protected by patents. It
|
||||
is the users' responsibility to obtain the appropriate
|
||||
licenses before using those parts.
|
||||
|
||||
If this compilation is used in object code form in an application
|
||||
software, acknowledgement of the author is not required but would be
|
||||
appreciated. The contribution of any useful modifications or extensions
|
||||
to Wei Dai is not required but would also be appreciated.
|
||||
@@ -1,429 +1,429 @@
|
||||
Crypto++: a C++ Class Library of Cryptographic Schemes
|
||||
Version 5.6.0 (3/15/2009)
|
||||
|
||||
Crypto++ Library is a free C++ class library of cryptographic schemes.
|
||||
Currently the library contains the following algorithms:
|
||||
|
||||
algorithm type name
|
||||
|
||||
authenticated encryption schemes GCM, CCM, EAX
|
||||
|
||||
high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20
|
||||
|
||||
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
|
||||
CAST-256
|
||||
|
||||
IDEA, Triple-DES (DES-EDE2 and DES-EDE3),
|
||||
other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA,
|
||||
Skipjack, SHACAL-2
|
||||
|
||||
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
|
||||
CFB, OFB, counter mode (CTR)
|
||||
|
||||
message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC,
|
||||
Two-Track-MAC
|
||||
|
||||
SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and
|
||||
hash functions SHA-512), Tiger, WHIRLPOOL, RIPEMD-128,
|
||||
RIPEMD-256, RIPEMD-160, RIPEMD-320
|
||||
|
||||
RSA, DSA, ElGamal, Nyberg-Rueppel (NR),
|
||||
public-key cryptography Rabin, Rabin-Williams (RW), LUC, LUCELG,
|
||||
DLIES (variants of DHAES), ESIGN
|
||||
|
||||
padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363
|
||||
systems EMSA2 and EMSA5
|
||||
|
||||
Diffie-Hellman (DH), Unified Diffie-Hellman
|
||||
key agreement schemes (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF,
|
||||
XTR-DH
|
||||
|
||||
elliptic curve cryptography ECDSA, ECNR, ECIES, ECDH, ECMQV
|
||||
|
||||
insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL
|
||||
algorithms retained for backwards 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2,
|
||||
compatibility and historical SAFER, 3-WAY, GOST, SHARK, CAST-128, Square
|
||||
value
|
||||
|
||||
Other features include:
|
||||
|
||||
* pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool
|
||||
* password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5,
|
||||
PBKDF from PKCS #12 appendix B
|
||||
* Shamir's secret sharing scheme and Rabin's information dispersal algorithm
|
||||
(IDA)
|
||||
* fast multi-precision integer (bignum) and polynomial operations
|
||||
* finite field arithmetics, including GF(p) and GF(2^n)
|
||||
* prime number generation and verification
|
||||
* useful non-cryptographic algorithms
|
||||
+ DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and
|
||||
zlib (RFC 1950) format support
|
||||
+ hex, base-32, and base-64 coding/decoding
|
||||
+ 32-bit CRC and Adler32 checksum
|
||||
* class wrappers for these operating system features (optional):
|
||||
+ high resolution timers on Windows, Unix, and Mac OS
|
||||
+ Berkeley and Windows style sockets
|
||||
+ Windows named pipes
|
||||
+ /dev/random, /dev/urandom, /dev/srandom
|
||||
+ Microsoft's CryptGenRandom on Windows
|
||||
* A high level interface for most of the above, using a filter/pipeline
|
||||
metaphor
|
||||
* benchmarks and validation testing
|
||||
* x86, x86-64 (x64), MMX, and SSE2 assembly code for the most commonly used
|
||||
algorithms, with run-time CPU feature detection and code selection
|
||||
* some versions are available in FIPS 140-2 validated form
|
||||
|
||||
You are welcome to use it for any purpose without paying me, but see
|
||||
License.txt for the fine print.
|
||||
|
||||
The following compilers are supported for this release. Please visit
|
||||
http://www.cryptopp.com the most up to date build instructions and porting notes.
|
||||
|
||||
* MSVC 6.0 - 2008
|
||||
* GCC 3.3 - 4.3
|
||||
* C++Builder 2009
|
||||
* Intel C++ Compiler 9 - 11
|
||||
* Sun Studio 12 (CC 5.9)
|
||||
|
||||
*** Important Usage Notes ***
|
||||
|
||||
1. If a constructor for A takes a pointer to an object B (except primitive
|
||||
types such as int and char), then A owns B and will delete B at A's
|
||||
destruction. If a constructor for A takes a reference to an object B,
|
||||
then the caller retains ownership of B and should not destroy it until
|
||||
A no longer needs it.
|
||||
|
||||
2. Crypto++ is thread safe at the class level. This means you can use
|
||||
Crypto++ safely in a multithreaded application, but you must provide
|
||||
synchronization when multiple threads access a common Crypto++ object.
|
||||
|
||||
*** MSVC-Specific Information ***
|
||||
|
||||
On Windows, Crypto++ can be compiled into 3 forms: a static library
|
||||
including all algorithms, a DLL with only FIPS Approved algorithms, and
|
||||
a static library with only algorithms not in the DLL.
|
||||
(FIPS Approved means Approved according to the FIPS 140-2 standard.)
|
||||
The DLL may be used by itself, or it may be used together with the second
|
||||
form of the static library. MSVC project files are included to build
|
||||
all three forms, and sample applications using each of the three forms
|
||||
are also included.
|
||||
|
||||
To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET
|
||||
2003) or "cryptest.sln" (for MSVC .NET 2005) workspace file and build one or
|
||||
more of the following projects:
|
||||
|
||||
cryptdll - This builds the DLL. Please note that if you wish to use Crypto++
|
||||
as a FIPS validated module, you must use a pre-built DLL that has undergone
|
||||
the FIPS validation process instead of building your own.
|
||||
dlltest - This builds a sample application that only uses the DLL.
|
||||
cryptest Non-DLL-Import Configuration - This builds the full static library
|
||||
along with a full test driver.
|
||||
cryptest DLL-Import Configuration - This builds a static library containing
|
||||
only algorithms not in the DLL, along with a full test driver that uses
|
||||
both the DLL and the static library.
|
||||
|
||||
To use the Crypto++ DLL in your application, #include "dll.h" before including
|
||||
any other Crypto++ header files, and place the DLL in the same directory as
|
||||
your .exe file. dll.h includes the line #pragma comment(lib, "cryptopp")
|
||||
so you don't have to explicitly list the import library in your project
|
||||
settings. To use a static library form of Crypto++, specify it as
|
||||
an additional library to link with in your project settings.
|
||||
In either case you should check the compiler options to
|
||||
make sure that the library and your application are using the same C++
|
||||
run-time libraries and calling conventions.
|
||||
|
||||
*** DLL Memory Management ***
|
||||
|
||||
Because it's possible for the Crypto++ DLL to delete objects allocated
|
||||
by the calling application, they must use the same C++ memory heap. Three
|
||||
methods are provided to achieve this.
|
||||
1. The calling application can tell Crypto++ what heap to use. This method
|
||||
is required when the calling application uses a non-standard heap.
|
||||
2. Crypto++ can tell the calling application what heap to use. This method
|
||||
is required when the calling application uses a statically linked C++ Run
|
||||
Time Library. (Method 1 does not work in this case because the Crypto++ DLL
|
||||
is initialized before the calling application's heap is initialized.)
|
||||
3. Crypto++ can automatically use the heap provided by the calling application's
|
||||
dynamically linked C++ Run Time Library. The calling application must
|
||||
make sure that the dynamically linked C++ Run Time Library is initialized
|
||||
before Crypto++ is loaded. (At this time it is not clear if it is possible
|
||||
to control the order in which DLLs are initialized on Windows 9x machines,
|
||||
so it might be best to avoid using this method.)
|
||||
|
||||
When Crypto++ attaches to a new process, it searches all modules loaded
|
||||
into the process space for exported functions "GetNewAndDeleteForCryptoPP"
|
||||
and "SetNewAndDeleteFromCryptoPP". If one of these functions is found,
|
||||
Crypto++ uses methods 1 or 2, respectively, by calling the function.
|
||||
Otherwise, method 3 is used.
|
||||
|
||||
*** GCC-Specific Information ***
|
||||
|
||||
A makefile is included for you to compile Crypto++ with GCC. Make sure
|
||||
you are using GNU Make and GNU ld. The make process will produce two files,
|
||||
libcryptopp.a and cryptest.exe. Run "cryptest.exe v" for the validation
|
||||
suite.
|
||||
|
||||
*** Documentation and Support ***
|
||||
|
||||
Crypto++ is documented through inline comments in header files, which are
|
||||
processed through Doxygen to produce an HTML reference manual. You can find
|
||||
a link to the manual from http://www.cryptopp.com. Also at that site is
|
||||
the Crypto++ FAQ, which you should browse through before attempting to
|
||||
use this library, because it will likely answer many of questions that
|
||||
may come up.
|
||||
|
||||
If you run into any problems, please try the Crypto++ mailing list.
|
||||
The subscription information and the list archive are available on
|
||||
http://www.cryptopp.com. You can also email me directly by visiting
|
||||
http://www.weidai.com, but you will probably get a faster response through
|
||||
the mailing list.
|
||||
|
||||
*** History ***
|
||||
|
||||
1.0 - First public release. Withdrawn at the request of RSA DSI.
|
||||
- included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA,
|
||||
MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression
|
||||
- had a serious bug in the RSA key generation code.
|
||||
|
||||
1.1 - Removed RSA, RC4, RC5
|
||||
- Disabled calls to RSAREF's non-public functions
|
||||
- Minor bugs fixed
|
||||
|
||||
2.0 - a completely new, faster multiprecision integer class
|
||||
- added MD5-MAC, HAVAL, 3-WAY, TEA, SAFER, LUC, Rabin, BlumGoldwasser,
|
||||
elliptic curve algorithms
|
||||
- added the Lucas strong probable primality test
|
||||
- ElGamal encryption and signature schemes modified to avoid weaknesses
|
||||
- Diamond changed to Diamond2 because of key schedule weakness
|
||||
- fixed bug in WAKE key setup
|
||||
- SHS class renamed to SHA
|
||||
- lots of miscellaneous optimizations
|
||||
|
||||
2.1 - added Tiger, HMAC, GOST, RIPE-MD160, LUCELG, LUCDIF, XOR-MAC,
|
||||
OAEP, PSSR, SHARK
|
||||
- added precomputation to DH, ElGamal, DSA, and elliptic curve algorithms
|
||||
- added back RC5 and a new RSA
|
||||
- optimizations in elliptic curves over GF(p)
|
||||
- changed Rabin to use OAEP and PSSR
|
||||
- changed many classes to allow copy constructors to work correctly
|
||||
- improved exception generation and handling
|
||||
|
||||
2.2 - added SEAL, CAST-128, Square
|
||||
- fixed bug in HAVAL (padding problem)
|
||||
- fixed bug in triple-DES (decryption order was reversed)
|
||||
- fixed bug in RC5 (couldn't handle key length not a multiple of 4)
|
||||
- changed HMAC to conform to RFC-2104 (which is not compatible
|
||||
with the original HMAC)
|
||||
- changed secret sharing and information dispersal to use GF(2^32)
|
||||
instead of GF(65521)
|
||||
- removed zero knowledge prover/verifier for graph isomorphism
|
||||
- removed several utility classes in favor of the C++ standard library
|
||||
|
||||
2.3 - ported to EGCS
|
||||
- fixed incomplete workaround of min/max conflict in MSVC
|
||||
|
||||
3.0 - placed all names into the "CryptoPP" namespace
|
||||
- added MD2, RC2, RC6, MARS, RW, DH2, MQV, ECDHC, CBC-CTS
|
||||
- added abstract base classes PK_SimpleKeyAgreementDomain and
|
||||
PK_AuthenticatedKeyAgreementDomain
|
||||
- changed DH and LUCDIF to implement the PK_SimpleKeyAgreementDomain
|
||||
interface and to perform domain parameter and key validation
|
||||
- changed interfaces of PK_Signer and PK_Verifier to sign and verify
|
||||
messages instead of message digests
|
||||
- changed OAEP to conform to PKCS#1 v2.0
|
||||
- changed benchmark code to produce HTML tables as output
|
||||
- changed PSSR to track IEEE P1363a
|
||||
- renamed ElGamalSignature to NR and changed it to track IEEE P1363
|
||||
- renamed ECKEP to ECMQVC and changed it to track IEEE P1363
|
||||
- renamed several other classes for clarity
|
||||
- removed support for calling RSAREF
|
||||
- removed option to compile old SHA (SHA-0)
|
||||
- removed option not to throw exceptions
|
||||
|
||||
3.1 - added ARC4, Rijndael, Twofish, Serpent, CBC-MAC, DMAC
|
||||
- added interface for querying supported key lengths of symmetric ciphers
|
||||
and MACs
|
||||
- added sample code for RSA signature and verification
|
||||
- changed CBC-CTS to be compatible with RFC 2040
|
||||
- updated SEAL to version 3.0 of the cipher specification
|
||||
- optimized multiprecision squaring and elliptic curves over GF(p)
|
||||
- fixed bug in MARS key setup
|
||||
- fixed bug with attaching objects to Deflator
|
||||
|
||||
3.2 - added DES-XEX3, ECDSA, DefaultEncryptorWithMAC
|
||||
- renamed DES-EDE to DES-EDE2 and TripleDES to DES-EDE3
|
||||
- optimized ARC4
|
||||
- generalized DSA to allow keys longer than 1024 bits
|
||||
- fixed bugs in GF2N and ModularArithmetic that can cause calculation errors
|
||||
- fixed crashing bug in Inflator when given invalid inputs
|
||||
- fixed endian bug in Serpent
|
||||
- fixed padding bug in Tiger
|
||||
|
||||
4.0 - added Skipjack, CAST-256, Panama, SHA-2 (SHA-256, SHA-384, and SHA-512),
|
||||
and XTR-DH
|
||||
- added a faster variant of Rabin's Information Dispersal Algorithm (IDA)
|
||||
- added class wrappers for these operating system features:
|
||||
- high resolution timers on Windows, Unix, and MacOS
|
||||
- Berkeley and Windows style sockets
|
||||
- Windows named pipes
|
||||
- /dev/random and /dev/urandom on Linux and FreeBSD
|
||||
- Microsoft's CryptGenRandom on Windows
|
||||
- added support for SEC 1 elliptic curve key format and compressed points
|
||||
- added support for X.509 public key format (subjectPublicKeyInfo) for
|
||||
RSA, DSA, and elliptic curve schemes
|
||||
- added support for DER and OpenPGP signature format for DSA
|
||||
- added support for ZLIB compressed data format (RFC 1950)
|
||||
- changed elliptic curve encryption to use ECIES (as defined in SEC 1)
|
||||
- changed MARS key schedule to reflect the latest specification
|
||||
- changed BufferedTransformation interface to support multiple channels
|
||||
and messages
|
||||
- changed CAST and SHA-1 implementations to use public domain source code
|
||||
- fixed bug in StringSource
|
||||
- optmized multi-precision integer code for better performance
|
||||
|
||||
4.1 - added more support for the recommended elliptic curve parameters in SEC 2
|
||||
- added Panama MAC, MARC4
|
||||
- added IV stealing feature to CTS mode
|
||||
- added support for PKCS #8 private key format for RSA, DSA, and elliptic
|
||||
curve schemes
|
||||
- changed Deflate, MD5, Rijndael, and Twofish to use public domain code
|
||||
- fixed a bug with flushing compressed streams
|
||||
- fixed a bug with decompressing stored blocks
|
||||
- fixed a bug with EC point decompression using non-trinomial basis
|
||||
- fixed a bug in NetworkSource::GeneralPump()
|
||||
- fixed a performance issue with EC over GF(p) decryption
|
||||
- fixed syntax to allow GCC to compile without -fpermissive
|
||||
- relaxed some restrictions in the license
|
||||
|
||||
4.2 - added support for longer HMAC keys
|
||||
- added MD4 (which is not secure so use for compatibility purposes only)
|
||||
- added compatibility fixes/workarounds for STLport 4.5, GCC 3.0.2,
|
||||
and MSVC 7.0
|
||||
- changed MD2 to use public domain code
|
||||
- fixed a bug with decompressing multiple messages with the same object
|
||||
- fixed a bug in CBC-MAC with MACing multiple messages with the same object
|
||||
- fixed a bug in RC5 and RC6 with zero-length keys
|
||||
- fixed a bug in Adler32 where incorrect checksum may be generated
|
||||
|
||||
5.0 - added ESIGN, DLIES, WAKE-OFB, PBKDF1 and PBKDF2 from PKCS #5
|
||||
- added key validation for encryption and signature public/private keys
|
||||
- renamed StreamCipher interface to SymmetricCipher, which is now implemented
|
||||
by both stream ciphers and block cipher modes including ECB and CBC
|
||||
- added keying interfaces to support resetting of keys and IVs without
|
||||
having to destroy and recreate objects
|
||||
- changed filter interface to support non-blocking input/output
|
||||
- changed SocketSource and SocketSink to use overlapped I/O on Microsoft Windows
|
||||
- grouped related classes inside structs to help templates, for example
|
||||
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
|
||||
- where possible, typedefs have been added to improve backwards
|
||||
compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
|
||||
- changed Serpent, HAVAL and IDEA to use public domain code
|
||||
- implemented SSE2 optimizations for Integer operations
|
||||
- fixed a bug in HMAC::TruncatedFinal()
|
||||
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
|
||||
|
||||
5.01 - added known answer test for X9.17 RNG in FIPS 140 power-up self test
|
||||
- submitted to NIST/CSE, but not publicly released
|
||||
|
||||
5.02 - changed EDC test to MAC integrity check using HMAC/SHA1
|
||||
- improved performance of integrity check
|
||||
- added blinding to defend against RSA timing attack
|
||||
|
||||
5.03 - created DLL version of Crypto++ for FIPS 140-2 validation
|
||||
- fixed vulnerabilities in GetNextIV for CTR and OFB modes
|
||||
|
||||
5.0.4 - Removed DES, SHA-256, SHA-384, SHA-512 from DLL
|
||||
|
||||
5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
|
||||
- added blinding for RSA and Rabin to defend against timing attacks
|
||||
on decryption operations
|
||||
- changed signing and decryption APIs to support the above
|
||||
- changed WaitObjectContainer to allow waiting for more than 64
|
||||
objects at a time on Win32 platforms
|
||||
- fixed a bug in CBC and ECB modes with processing non-aligned data
|
||||
- fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
|
||||
signature scheme (these fixes are not backwards compatible)
|
||||
- fixed a number of compiler warnings, minor bugs, and portability problems
|
||||
- removed Sapphire
|
||||
|
||||
5.2 - merged in changes for 5.01 - 5.0.4
|
||||
- added support for using encoding parameters and key derivation parameters
|
||||
with public key encryption (implemented by OAEP and DL/ECIES)
|
||||
- added Camellia, SHACAL-2, Two-Track-MAC, Whirlpool, RIPEMD-320,
|
||||
RIPEMD-128, RIPEMD-256, Base-32 coding, FIPS variant of CFB mode
|
||||
- added ThreadUserTimer for timing thread CPU usage
|
||||
- added option for password-based key derivation functions
|
||||
to iterate until a mimimum elapsed thread CPU time is reached
|
||||
- added option (on by default) for DEFLATE compression to detect
|
||||
uncompressible files and process them more quickly
|
||||
- improved compatibility and performance on 64-bit platforms,
|
||||
including Alpha, IA-64, x86-64, PPC64, Sparc64, and MIPS64
|
||||
- fixed ONE_AND_ZEROS_PADDING to use 0x80 instead 0x01 as padding.
|
||||
- fixed encoding/decoding of PKCS #8 privateKeyInfo to properly
|
||||
handle optional attributes
|
||||
|
||||
5.2.1 - fixed bug in the "dlltest" DLL testing program
|
||||
- fixed compiling with STLport using VC .NET
|
||||
- fixed compiling with -fPIC using GCC
|
||||
- fixed compiling with -msse2 on systems without memalign()
|
||||
- fixed inability to instantiate PanamaMAC
|
||||
- fixed problems with inline documentation
|
||||
|
||||
5.2.2 - added SHA-224
|
||||
- put SHA-256, SHA-384, SHA-512, RSASSA-PSS into DLL
|
||||
|
||||
5.2.3 - fixed issues with FIPS algorithm test vectors
|
||||
- put RSASSA-ISO into DLL
|
||||
|
||||
5.3 - ported to MSVC 2005 with support for x86-64
|
||||
- added defense against AES timing attacks, and more AES test vectors
|
||||
- changed StaticAlgorithmName() of Rijndael to "AES", CTR to "CTR"
|
||||
|
||||
5.4 - added Salsa20
|
||||
- updated Whirlpool to version 3.0
|
||||
- ported to GCC 4.1, Sun C++ 5.8, and Borland C++Builder 2006
|
||||
|
||||
5.5 - added VMAC and Sosemanuk (with x86-64 and SSE2 assembly)
|
||||
- improved speed of integer arithmetic, AES, SHA-512, Tiger, Salsa20,
|
||||
Whirlpool, and PANAMA cipher using assembly (x86-64, MMX, SSE2)
|
||||
- optimized Camellia and added defense against timing attacks
|
||||
- updated benchmarks code to show cycles per byte and to time key/IV setup
|
||||
- started using OpenMP for increased multi-core speed
|
||||
- enabled GCC optimization flags by default in GNUmakefile
|
||||
- added blinding and computational error checking for RW signing
|
||||
- changed RandomPool, X917RNG, GetNextIV, DSA/NR/ECDSA/ECNR to reduce
|
||||
the risk of reusing random numbers and IVs after virtual machine state
|
||||
rollback
|
||||
- changed default FIPS mode RNG from AutoSeededX917RNG<DES_EDE3> to
|
||||
AutoSeededX917RNG<AES>
|
||||
- fixed PANAMA cipher interface to accept 256-bit key and 256-bit IV
|
||||
- moved MD2, MD4, MD5, PanamaHash, ARC4, WAKE_CFB into the namespace "Weak"
|
||||
- removed HAVAL, MD5-MAC, XMAC
|
||||
|
||||
5.5.1 - fixed VMAC validation failure on 32-bit big-endian machines
|
||||
|
||||
5.5.2 - ported x64 assembly language code for AES, Salsa20, Sosemanuk, and Panama
|
||||
to MSVC 2005 (using MASM since MSVC doesn't support inline assembly on x64)
|
||||
- fixed Salsa20 initialization crash on non-SSE2 machines
|
||||
- fixed Whirlpool crash on Pentium 2 machines
|
||||
- fixed possible branch prediction analysis (BPA) vulnerability in
|
||||
MontgomeryReduce(), which may affect security of RSA, RW, LUC
|
||||
- fixed link error with MSVC 2003 when using "debug DLL" form of runtime library
|
||||
- fixed crash in SSE2_Add on P4 machines when compiled with
|
||||
MSVC 6.0 SP5 with Processor Pack
|
||||
- ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0,
|
||||
and Borland C++Builder 2007
|
||||
|
||||
5.6 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
|
||||
- added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
|
||||
- added support for variable length IVs
|
||||
- improved AES and SHA-256 speed on x86 and x64
|
||||
- fixed incorrect VMAC computation on message lengths
|
||||
that are >64 mod 128 (x86 assembly version is not affected)
|
||||
- fixed compiler error in vmac.cpp on x86 with GCC -fPIC
|
||||
- fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
|
||||
- fixed HashFilter bug when putMessage=true
|
||||
- removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
|
||||
- ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11
|
||||
|
||||
Written by Wei Dai
|
||||
Crypto++: a C++ Class Library of Cryptographic Schemes
|
||||
Version 5.6.0 (3/15/2009)
|
||||
|
||||
Crypto++ Library is a free C++ class library of cryptographic schemes.
|
||||
Currently the library contains the following algorithms:
|
||||
|
||||
algorithm type name
|
||||
|
||||
authenticated encryption schemes GCM, CCM, EAX
|
||||
|
||||
high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20
|
||||
|
||||
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
|
||||
CAST-256
|
||||
|
||||
IDEA, Triple-DES (DES-EDE2 and DES-EDE3),
|
||||
other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA,
|
||||
Skipjack, SHACAL-2
|
||||
|
||||
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
|
||||
CFB, OFB, counter mode (CTR)
|
||||
|
||||
message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC,
|
||||
Two-Track-MAC
|
||||
|
||||
SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and
|
||||
hash functions SHA-512), Tiger, WHIRLPOOL, RIPEMD-128,
|
||||
RIPEMD-256, RIPEMD-160, RIPEMD-320
|
||||
|
||||
RSA, DSA, ElGamal, Nyberg-Rueppel (NR),
|
||||
public-key cryptography Rabin, Rabin-Williams (RW), LUC, LUCELG,
|
||||
DLIES (variants of DHAES), ESIGN
|
||||
|
||||
padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363
|
||||
systems EMSA2 and EMSA5
|
||||
|
||||
Diffie-Hellman (DH), Unified Diffie-Hellman
|
||||
key agreement schemes (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF,
|
||||
XTR-DH
|
||||
|
||||
elliptic curve cryptography ECDSA, ECNR, ECIES, ECDH, ECMQV
|
||||
|
||||
insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL
|
||||
algorithms retained for backwards 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2,
|
||||
compatibility and historical SAFER, 3-WAY, GOST, SHARK, CAST-128, Square
|
||||
value
|
||||
|
||||
Other features include:
|
||||
|
||||
* pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool
|
||||
* password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5,
|
||||
PBKDF from PKCS #12 appendix B
|
||||
* Shamir's secret sharing scheme and Rabin's information dispersal algorithm
|
||||
(IDA)
|
||||
* fast multi-precision integer (bignum) and polynomial operations
|
||||
* finite field arithmetics, including GF(p) and GF(2^n)
|
||||
* prime number generation and verification
|
||||
* useful non-cryptographic algorithms
|
||||
+ DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and
|
||||
zlib (RFC 1950) format support
|
||||
+ hex, base-32, and base-64 coding/decoding
|
||||
+ 32-bit CRC and Adler32 checksum
|
||||
* class wrappers for these operating system features (optional):
|
||||
+ high resolution timers on Windows, Unix, and Mac OS
|
||||
+ Berkeley and Windows style sockets
|
||||
+ Windows named pipes
|
||||
+ /dev/random, /dev/urandom, /dev/srandom
|
||||
+ Microsoft's CryptGenRandom on Windows
|
||||
* A high level interface for most of the above, using a filter/pipeline
|
||||
metaphor
|
||||
* benchmarks and validation testing
|
||||
* x86, x86-64 (x64), MMX, and SSE2 assembly code for the most commonly used
|
||||
algorithms, with run-time CPU feature detection and code selection
|
||||
* some versions are available in FIPS 140-2 validated form
|
||||
|
||||
You are welcome to use it for any purpose without paying me, but see
|
||||
License.txt for the fine print.
|
||||
|
||||
The following compilers are supported for this release. Please visit
|
||||
http://www.cryptopp.com the most up to date build instructions and porting notes.
|
||||
|
||||
* MSVC 6.0 - 2008
|
||||
* GCC 3.3 - 4.3
|
||||
* C++Builder 2009
|
||||
* Intel C++ Compiler 9 - 11
|
||||
* Sun Studio 12 (CC 5.9)
|
||||
|
||||
*** Important Usage Notes ***
|
||||
|
||||
1. If a constructor for A takes a pointer to an object B (except primitive
|
||||
types such as int and char), then A owns B and will delete B at A's
|
||||
destruction. If a constructor for A takes a reference to an object B,
|
||||
then the caller retains ownership of B and should not destroy it until
|
||||
A no longer needs it.
|
||||
|
||||
2. Crypto++ is thread safe at the class level. This means you can use
|
||||
Crypto++ safely in a multithreaded application, but you must provide
|
||||
synchronization when multiple threads access a common Crypto++ object.
|
||||
|
||||
*** MSVC-Specific Information ***
|
||||
|
||||
On Windows, Crypto++ can be compiled into 3 forms: a static library
|
||||
including all algorithms, a DLL with only FIPS Approved algorithms, and
|
||||
a static library with only algorithms not in the DLL.
|
||||
(FIPS Approved means Approved according to the FIPS 140-2 standard.)
|
||||
The DLL may be used by itself, or it may be used together with the second
|
||||
form of the static library. MSVC project files are included to build
|
||||
all three forms, and sample applications using each of the three forms
|
||||
are also included.
|
||||
|
||||
To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET
|
||||
2003) or "cryptest.sln" (for MSVC .NET 2005) workspace file and build one or
|
||||
more of the following projects:
|
||||
|
||||
cryptdll - This builds the DLL. Please note that if you wish to use Crypto++
|
||||
as a FIPS validated module, you must use a pre-built DLL that has undergone
|
||||
the FIPS validation process instead of building your own.
|
||||
dlltest - This builds a sample application that only uses the DLL.
|
||||
cryptest Non-DLL-Import Configuration - This builds the full static library
|
||||
along with a full test driver.
|
||||
cryptest DLL-Import Configuration - This builds a static library containing
|
||||
only algorithms not in the DLL, along with a full test driver that uses
|
||||
both the DLL and the static library.
|
||||
|
||||
To use the Crypto++ DLL in your application, #include "dll.h" before including
|
||||
any other Crypto++ header files, and place the DLL in the same directory as
|
||||
your .exe file. dll.h includes the line #pragma comment(lib, "cryptopp")
|
||||
so you don't have to explicitly list the import library in your project
|
||||
settings. To use a static library form of Crypto++, specify it as
|
||||
an additional library to link with in your project settings.
|
||||
In either case you should check the compiler options to
|
||||
make sure that the library and your application are using the same C++
|
||||
run-time libraries and calling conventions.
|
||||
|
||||
*** DLL Memory Management ***
|
||||
|
||||
Because it's possible for the Crypto++ DLL to delete objects allocated
|
||||
by the calling application, they must use the same C++ memory heap. Three
|
||||
methods are provided to achieve this.
|
||||
1. The calling application can tell Crypto++ what heap to use. This method
|
||||
is required when the calling application uses a non-standard heap.
|
||||
2. Crypto++ can tell the calling application what heap to use. This method
|
||||
is required when the calling application uses a statically linked C++ Run
|
||||
Time Library. (Method 1 does not work in this case because the Crypto++ DLL
|
||||
is initialized before the calling application's heap is initialized.)
|
||||
3. Crypto++ can automatically use the heap provided by the calling application's
|
||||
dynamically linked C++ Run Time Library. The calling application must
|
||||
make sure that the dynamically linked C++ Run Time Library is initialized
|
||||
before Crypto++ is loaded. (At this time it is not clear if it is possible
|
||||
to control the order in which DLLs are initialized on Windows 9x machines,
|
||||
so it might be best to avoid using this method.)
|
||||
|
||||
When Crypto++ attaches to a new process, it searches all modules loaded
|
||||
into the process space for exported functions "GetNewAndDeleteForCryptoPP"
|
||||
and "SetNewAndDeleteFromCryptoPP". If one of these functions is found,
|
||||
Crypto++ uses methods 1 or 2, respectively, by calling the function.
|
||||
Otherwise, method 3 is used.
|
||||
|
||||
*** GCC-Specific Information ***
|
||||
|
||||
A makefile is included for you to compile Crypto++ with GCC. Make sure
|
||||
you are using GNU Make and GNU ld. The make process will produce two files,
|
||||
libcryptopp.a and cryptest.exe. Run "cryptest.exe v" for the validation
|
||||
suite.
|
||||
|
||||
*** Documentation and Support ***
|
||||
|
||||
Crypto++ is documented through inline comments in header files, which are
|
||||
processed through Doxygen to produce an HTML reference manual. You can find
|
||||
a link to the manual from http://www.cryptopp.com. Also at that site is
|
||||
the Crypto++ FAQ, which you should browse through before attempting to
|
||||
use this library, because it will likely answer many of questions that
|
||||
may come up.
|
||||
|
||||
If you run into any problems, please try the Crypto++ mailing list.
|
||||
The subscription information and the list archive are available on
|
||||
http://www.cryptopp.com. You can also email me directly by visiting
|
||||
http://www.weidai.com, but you will probably get a faster response through
|
||||
the mailing list.
|
||||
|
||||
*** History ***
|
||||
|
||||
1.0 - First public release. Withdrawn at the request of RSA DSI.
|
||||
- included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA,
|
||||
MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression
|
||||
- had a serious bug in the RSA key generation code.
|
||||
|
||||
1.1 - Removed RSA, RC4, RC5
|
||||
- Disabled calls to RSAREF's non-public functions
|
||||
- Minor bugs fixed
|
||||
|
||||
2.0 - a completely new, faster multiprecision integer class
|
||||
- added MD5-MAC, HAVAL, 3-WAY, TEA, SAFER, LUC, Rabin, BlumGoldwasser,
|
||||
elliptic curve algorithms
|
||||
- added the Lucas strong probable primality test
|
||||
- ElGamal encryption and signature schemes modified to avoid weaknesses
|
||||
- Diamond changed to Diamond2 because of key schedule weakness
|
||||
- fixed bug in WAKE key setup
|
||||
- SHS class renamed to SHA
|
||||
- lots of miscellaneous optimizations
|
||||
|
||||
2.1 - added Tiger, HMAC, GOST, RIPE-MD160, LUCELG, LUCDIF, XOR-MAC,
|
||||
OAEP, PSSR, SHARK
|
||||
- added precomputation to DH, ElGamal, DSA, and elliptic curve algorithms
|
||||
- added back RC5 and a new RSA
|
||||
- optimizations in elliptic curves over GF(p)
|
||||
- changed Rabin to use OAEP and PSSR
|
||||
- changed many classes to allow copy constructors to work correctly
|
||||
- improved exception generation and handling
|
||||
|
||||
2.2 - added SEAL, CAST-128, Square
|
||||
- fixed bug in HAVAL (padding problem)
|
||||
- fixed bug in triple-DES (decryption order was reversed)
|
||||
- fixed bug in RC5 (couldn't handle key length not a multiple of 4)
|
||||
- changed HMAC to conform to RFC-2104 (which is not compatible
|
||||
with the original HMAC)
|
||||
- changed secret sharing and information dispersal to use GF(2^32)
|
||||
instead of GF(65521)
|
||||
- removed zero knowledge prover/verifier for graph isomorphism
|
||||
- removed several utility classes in favor of the C++ standard library
|
||||
|
||||
2.3 - ported to EGCS
|
||||
- fixed incomplete workaround of min/max conflict in MSVC
|
||||
|
||||
3.0 - placed all names into the "CryptoPP" namespace
|
||||
- added MD2, RC2, RC6, MARS, RW, DH2, MQV, ECDHC, CBC-CTS
|
||||
- added abstract base classes PK_SimpleKeyAgreementDomain and
|
||||
PK_AuthenticatedKeyAgreementDomain
|
||||
- changed DH and LUCDIF to implement the PK_SimpleKeyAgreementDomain
|
||||
interface and to perform domain parameter and key validation
|
||||
- changed interfaces of PK_Signer and PK_Verifier to sign and verify
|
||||
messages instead of message digests
|
||||
- changed OAEP to conform to PKCS#1 v2.0
|
||||
- changed benchmark code to produce HTML tables as output
|
||||
- changed PSSR to track IEEE P1363a
|
||||
- renamed ElGamalSignature to NR and changed it to track IEEE P1363
|
||||
- renamed ECKEP to ECMQVC and changed it to track IEEE P1363
|
||||
- renamed several other classes for clarity
|
||||
- removed support for calling RSAREF
|
||||
- removed option to compile old SHA (SHA-0)
|
||||
- removed option not to throw exceptions
|
||||
|
||||
3.1 - added ARC4, Rijndael, Twofish, Serpent, CBC-MAC, DMAC
|
||||
- added interface for querying supported key lengths of symmetric ciphers
|
||||
and MACs
|
||||
- added sample code for RSA signature and verification
|
||||
- changed CBC-CTS to be compatible with RFC 2040
|
||||
- updated SEAL to version 3.0 of the cipher specification
|
||||
- optimized multiprecision squaring and elliptic curves over GF(p)
|
||||
- fixed bug in MARS key setup
|
||||
- fixed bug with attaching objects to Deflator
|
||||
|
||||
3.2 - added DES-XEX3, ECDSA, DefaultEncryptorWithMAC
|
||||
- renamed DES-EDE to DES-EDE2 and TripleDES to DES-EDE3
|
||||
- optimized ARC4
|
||||
- generalized DSA to allow keys longer than 1024 bits
|
||||
- fixed bugs in GF2N and ModularArithmetic that can cause calculation errors
|
||||
- fixed crashing bug in Inflator when given invalid inputs
|
||||
- fixed endian bug in Serpent
|
||||
- fixed padding bug in Tiger
|
||||
|
||||
4.0 - added Skipjack, CAST-256, Panama, SHA-2 (SHA-256, SHA-384, and SHA-512),
|
||||
and XTR-DH
|
||||
- added a faster variant of Rabin's Information Dispersal Algorithm (IDA)
|
||||
- added class wrappers for these operating system features:
|
||||
- high resolution timers on Windows, Unix, and MacOS
|
||||
- Berkeley and Windows style sockets
|
||||
- Windows named pipes
|
||||
- /dev/random and /dev/urandom on Linux and FreeBSD
|
||||
- Microsoft's CryptGenRandom on Windows
|
||||
- added support for SEC 1 elliptic curve key format and compressed points
|
||||
- added support for X.509 public key format (subjectPublicKeyInfo) for
|
||||
RSA, DSA, and elliptic curve schemes
|
||||
- added support for DER and OpenPGP signature format for DSA
|
||||
- added support for ZLIB compressed data format (RFC 1950)
|
||||
- changed elliptic curve encryption to use ECIES (as defined in SEC 1)
|
||||
- changed MARS key schedule to reflect the latest specification
|
||||
- changed BufferedTransformation interface to support multiple channels
|
||||
and messages
|
||||
- changed CAST and SHA-1 implementations to use public domain source code
|
||||
- fixed bug in StringSource
|
||||
- optmized multi-precision integer code for better performance
|
||||
|
||||
4.1 - added more support for the recommended elliptic curve parameters in SEC 2
|
||||
- added Panama MAC, MARC4
|
||||
- added IV stealing feature to CTS mode
|
||||
- added support for PKCS #8 private key format for RSA, DSA, and elliptic
|
||||
curve schemes
|
||||
- changed Deflate, MD5, Rijndael, and Twofish to use public domain code
|
||||
- fixed a bug with flushing compressed streams
|
||||
- fixed a bug with decompressing stored blocks
|
||||
- fixed a bug with EC point decompression using non-trinomial basis
|
||||
- fixed a bug in NetworkSource::GeneralPump()
|
||||
- fixed a performance issue with EC over GF(p) decryption
|
||||
- fixed syntax to allow GCC to compile without -fpermissive
|
||||
- relaxed some restrictions in the license
|
||||
|
||||
4.2 - added support for longer HMAC keys
|
||||
- added MD4 (which is not secure so use for compatibility purposes only)
|
||||
- added compatibility fixes/workarounds for STLport 4.5, GCC 3.0.2,
|
||||
and MSVC 7.0
|
||||
- changed MD2 to use public domain code
|
||||
- fixed a bug with decompressing multiple messages with the same object
|
||||
- fixed a bug in CBC-MAC with MACing multiple messages with the same object
|
||||
- fixed a bug in RC5 and RC6 with zero-length keys
|
||||
- fixed a bug in Adler32 where incorrect checksum may be generated
|
||||
|
||||
5.0 - added ESIGN, DLIES, WAKE-OFB, PBKDF1 and PBKDF2 from PKCS #5
|
||||
- added key validation for encryption and signature public/private keys
|
||||
- renamed StreamCipher interface to SymmetricCipher, which is now implemented
|
||||
by both stream ciphers and block cipher modes including ECB and CBC
|
||||
- added keying interfaces to support resetting of keys and IVs without
|
||||
having to destroy and recreate objects
|
||||
- changed filter interface to support non-blocking input/output
|
||||
- changed SocketSource and SocketSink to use overlapped I/O on Microsoft Windows
|
||||
- grouped related classes inside structs to help templates, for example
|
||||
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
|
||||
- where possible, typedefs have been added to improve backwards
|
||||
compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
|
||||
- changed Serpent, HAVAL and IDEA to use public domain code
|
||||
- implemented SSE2 optimizations for Integer operations
|
||||
- fixed a bug in HMAC::TruncatedFinal()
|
||||
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
|
||||
|
||||
5.01 - added known answer test for X9.17 RNG in FIPS 140 power-up self test
|
||||
- submitted to NIST/CSE, but not publicly released
|
||||
|
||||
5.02 - changed EDC test to MAC integrity check using HMAC/SHA1
|
||||
- improved performance of integrity check
|
||||
- added blinding to defend against RSA timing attack
|
||||
|
||||
5.03 - created DLL version of Crypto++ for FIPS 140-2 validation
|
||||
- fixed vulnerabilities in GetNextIV for CTR and OFB modes
|
||||
|
||||
5.0.4 - Removed DES, SHA-256, SHA-384, SHA-512 from DLL
|
||||
|
||||
5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
|
||||
- added blinding for RSA and Rabin to defend against timing attacks
|
||||
on decryption operations
|
||||
- changed signing and decryption APIs to support the above
|
||||
- changed WaitObjectContainer to allow waiting for more than 64
|
||||
objects at a time on Win32 platforms
|
||||
- fixed a bug in CBC and ECB modes with processing non-aligned data
|
||||
- fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
|
||||
signature scheme (these fixes are not backwards compatible)
|
||||
- fixed a number of compiler warnings, minor bugs, and portability problems
|
||||
- removed Sapphire
|
||||
|
||||
5.2 - merged in changes for 5.01 - 5.0.4
|
||||
- added support for using encoding parameters and key derivation parameters
|
||||
with public key encryption (implemented by OAEP and DL/ECIES)
|
||||
- added Camellia, SHACAL-2, Two-Track-MAC, Whirlpool, RIPEMD-320,
|
||||
RIPEMD-128, RIPEMD-256, Base-32 coding, FIPS variant of CFB mode
|
||||
- added ThreadUserTimer for timing thread CPU usage
|
||||
- added option for password-based key derivation functions
|
||||
to iterate until a mimimum elapsed thread CPU time is reached
|
||||
- added option (on by default) for DEFLATE compression to detect
|
||||
uncompressible files and process them more quickly
|
||||
- improved compatibility and performance on 64-bit platforms,
|
||||
including Alpha, IA-64, x86-64, PPC64, Sparc64, and MIPS64
|
||||
- fixed ONE_AND_ZEROS_PADDING to use 0x80 instead 0x01 as padding.
|
||||
- fixed encoding/decoding of PKCS #8 privateKeyInfo to properly
|
||||
handle optional attributes
|
||||
|
||||
5.2.1 - fixed bug in the "dlltest" DLL testing program
|
||||
- fixed compiling with STLport using VC .NET
|
||||
- fixed compiling with -fPIC using GCC
|
||||
- fixed compiling with -msse2 on systems without memalign()
|
||||
- fixed inability to instantiate PanamaMAC
|
||||
- fixed problems with inline documentation
|
||||
|
||||
5.2.2 - added SHA-224
|
||||
- put SHA-256, SHA-384, SHA-512, RSASSA-PSS into DLL
|
||||
|
||||
5.2.3 - fixed issues with FIPS algorithm test vectors
|
||||
- put RSASSA-ISO into DLL
|
||||
|
||||
5.3 - ported to MSVC 2005 with support for x86-64
|
||||
- added defense against AES timing attacks, and more AES test vectors
|
||||
- changed StaticAlgorithmName() of Rijndael to "AES", CTR to "CTR"
|
||||
|
||||
5.4 - added Salsa20
|
||||
- updated Whirlpool to version 3.0
|
||||
- ported to GCC 4.1, Sun C++ 5.8, and Borland C++Builder 2006
|
||||
|
||||
5.5 - added VMAC and Sosemanuk (with x86-64 and SSE2 assembly)
|
||||
- improved speed of integer arithmetic, AES, SHA-512, Tiger, Salsa20,
|
||||
Whirlpool, and PANAMA cipher using assembly (x86-64, MMX, SSE2)
|
||||
- optimized Camellia and added defense against timing attacks
|
||||
- updated benchmarks code to show cycles per byte and to time key/IV setup
|
||||
- started using OpenMP for increased multi-core speed
|
||||
- enabled GCC optimization flags by default in GNUmakefile
|
||||
- added blinding and computational error checking for RW signing
|
||||
- changed RandomPool, X917RNG, GetNextIV, DSA/NR/ECDSA/ECNR to reduce
|
||||
the risk of reusing random numbers and IVs after virtual machine state
|
||||
rollback
|
||||
- changed default FIPS mode RNG from AutoSeededX917RNG<DES_EDE3> to
|
||||
AutoSeededX917RNG<AES>
|
||||
- fixed PANAMA cipher interface to accept 256-bit key and 256-bit IV
|
||||
- moved MD2, MD4, MD5, PanamaHash, ARC4, WAKE_CFB into the namespace "Weak"
|
||||
- removed HAVAL, MD5-MAC, XMAC
|
||||
|
||||
5.5.1 - fixed VMAC validation failure on 32-bit big-endian machines
|
||||
|
||||
5.5.2 - ported x64 assembly language code for AES, Salsa20, Sosemanuk, and Panama
|
||||
to MSVC 2005 (using MASM since MSVC doesn't support inline assembly on x64)
|
||||
- fixed Salsa20 initialization crash on non-SSE2 machines
|
||||
- fixed Whirlpool crash on Pentium 2 machines
|
||||
- fixed possible branch prediction analysis (BPA) vulnerability in
|
||||
MontgomeryReduce(), which may affect security of RSA, RW, LUC
|
||||
- fixed link error with MSVC 2003 when using "debug DLL" form of runtime library
|
||||
- fixed crash in SSE2_Add on P4 machines when compiled with
|
||||
MSVC 6.0 SP5 with Processor Pack
|
||||
- ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0,
|
||||
and Borland C++Builder 2007
|
||||
|
||||
5.6 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
|
||||
- added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
|
||||
- added support for variable length IVs
|
||||
- improved AES and SHA-256 speed on x86 and x64
|
||||
- fixed incorrect VMAC computation on message lengths
|
||||
that are >64 mod 128 (x86 assembly version is not affected)
|
||||
- fixed compiler error in vmac.cpp on x86 with GCC -fPIC
|
||||
- fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
|
||||
- fixed HashFilter bug when putMessage=true
|
||||
- removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
|
||||
- ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11
|
||||
|
||||
Written by Wei Dai
|
||||
@@ -1,462 +1,462 @@
|
||||
#ifndef CRYPTOPP_CONFIG_H
|
||||
#define CRYPTOPP_CONFIG_H
|
||||
|
||||
//// Bitcoin: disable SSE2 on 32-bit
|
||||
#if !defined(_M_X64) && !defined(__x86_64__)
|
||||
#define CRYPTOPP_DISABLE_SSE2 1
|
||||
#endif
|
||||
//////////// end of Bitcoin changes
|
||||
|
||||
|
||||
// ***************** Important Settings ********************
|
||||
|
||||
// define this if running on a big-endian CPU
|
||||
#if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))
|
||||
# define IS_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
// define this if running on a little-endian CPU
|
||||
// big endian will be assumed if IS_LITTLE_ENDIAN is not defined
|
||||
#ifndef IS_BIG_ENDIAN
|
||||
# define IS_LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
// define this if you want to disable all OS-dependent features,
|
||||
// such as sockets and OS-provided random number generators
|
||||
// #define NO_OS_DEPENDENCE
|
||||
|
||||
// Define this to use features provided by Microsoft's CryptoAPI.
|
||||
// Currently the only feature used is random number generation.
|
||||
// This macro will be ignored if NO_OS_DEPENDENCE is defined.
|
||||
#define USE_MS_CRYPTOAPI
|
||||
|
||||
// Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used
|
||||
#ifndef DSA_1024_BIT_MODULUS_ONLY
|
||||
# define DSA_1024_BIT_MODULUS_ONLY 1
|
||||
#endif
|
||||
|
||||
// ***************** Less Important Settings ***************
|
||||
|
||||
// define this to retain (as much as possible) old deprecated function and class names
|
||||
// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
|
||||
|
||||
#define GZIP_OS_CODE 0
|
||||
|
||||
// Try this if your CPU has 256K internal cache or a slow multiply instruction
|
||||
// and you want a (possibly) faster IDEA implementation using log tables
|
||||
// #define IDEA_LARGECACHE
|
||||
|
||||
// Define this if, for the linear congruential RNG, you want to use
|
||||
// the original constants as specified in S.K. Park and K.W. Miller's
|
||||
// CACM paper.
|
||||
// #define LCRNG_ORIGINAL_NUMBERS
|
||||
|
||||
// choose which style of sockets to wrap (mostly useful for cygwin which has both)
|
||||
#define PREFER_BERKELEY_STYLE_SOCKETS
|
||||
// #define PREFER_WINDOWS_STYLE_SOCKETS
|
||||
|
||||
// set the name of Rijndael cipher, was "Rijndael" before version 5.3
|
||||
#define CRYPTOPP_RIJNDAEL_NAME "AES"
|
||||
|
||||
// ***************** Important Settings Again ********************
|
||||
// But the defaults should be ok.
|
||||
|
||||
// namespace support is now required
|
||||
#ifdef NO_NAMESPACE
|
||||
# error namespace support is now required
|
||||
#endif
|
||||
|
||||
// Define this to workaround a Microsoft CryptoAPI bug where
|
||||
// each call to CryptAcquireContext causes a 100 KB memory leak.
|
||||
// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
|
||||
#define WORKAROUND_MS_BUG_Q258000
|
||||
|
||||
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
|
||||
// Avoid putting "CryptoPP::" in front of everything in Doxygen output
|
||||
# define CryptoPP
|
||||
# define NAMESPACE_BEGIN(x)
|
||||
# define NAMESPACE_END
|
||||
// Get Doxygen to generate better documentation for these typedefs
|
||||
# define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
|
||||
#else
|
||||
# define NAMESPACE_BEGIN(x) namespace x {
|
||||
# define NAMESPACE_END }
|
||||
# define DOCUMENTED_TYPEDEF(x, y) typedef x y;
|
||||
#endif
|
||||
#define ANONYMOUS_NAMESPACE_BEGIN namespace {
|
||||
#define USING_NAMESPACE(x) using namespace x;
|
||||
#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
|
||||
#define DOCUMENTED_NAMESPACE_END }
|
||||
|
||||
// What is the type of the third parameter to bind?
|
||||
// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
|
||||
// Unfortunately there is no way to tell whether or not socklen_t is defined.
|
||||
// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
|
||||
#ifndef TYPE_OF_SOCKLEN_T
|
||||
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# define TYPE_OF_SOCKLEN_T int
|
||||
# else
|
||||
# define TYPE_OF_SOCKLEN_T ::socklen_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
|
||||
# define __USE_W32_SOCKETS
|
||||
#endif
|
||||
|
||||
typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
typedef unsigned short word16;
|
||||
typedef unsigned int word32;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
typedef unsigned __int64 word64;
|
||||
#define W64LIT(x) x##ui64
|
||||
#else
|
||||
typedef unsigned long long word64;
|
||||
#define W64LIT(x) x##ULL
|
||||
#endif
|
||||
|
||||
// define large word type, used for file offsets and such
|
||||
typedef word64 lword;
|
||||
const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
// define hword, word, and dword. these are used for multiprecision integer arithmetic
|
||||
// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
|
||||
#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
|
||||
typedef word32 hword;
|
||||
typedef word64 word;
|
||||
#else
|
||||
#define CRYPTOPP_NATIVE_DWORD_AVAILABLE
|
||||
#if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
|
||||
// GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
|
||||
// mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
|
||||
typedef word32 hword;
|
||||
typedef word64 word;
|
||||
typedef __uint128_t dword;
|
||||
typedef __uint128_t word128;
|
||||
#define CRYPTOPP_WORD128_AVAILABLE
|
||||
#else
|
||||
// if we're here, it means we're on a 64-bit CPU but we don't have a way to obtain 128-bit multiplication results
|
||||
typedef word16 hword;
|
||||
typedef word32 word;
|
||||
typedef word64 dword;
|
||||
#endif
|
||||
#else
|
||||
// being here means the native register size is probably 32 bits or less
|
||||
#define CRYPTOPP_BOOL_SLOW_WORD64 1
|
||||
typedef word16 hword;
|
||||
typedef word32 word;
|
||||
typedef word64 dword;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef CRYPTOPP_BOOL_SLOW_WORD64
|
||||
#define CRYPTOPP_BOOL_SLOW_WORD64 0
|
||||
#endif
|
||||
|
||||
const unsigned int WORD_SIZE = sizeof(word);
|
||||
const unsigned int WORD_BITS = WORD_SIZE * 8;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
|
||||
// This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
#define CRYPTOPP_L1_CACHE_LINE_SIZE 64
|
||||
#else
|
||||
// L1 cache line size is 32 on Pentium III and earlier
|
||||
#define CRYPTOPP_L1_CACHE_LINE_SIZE 32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER == 1200
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#if _MSC_VER > 1200 || defined(_mm_free)
|
||||
#define CRYPTOPP_MSVC6PP_OR_LATER // VC 6 processor pack or later
|
||||
#else
|
||||
#define CRYPTOPP_MSVC6_NO_PP // VC 6 without processor pack
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_ALIGN_DATA
|
||||
#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
|
||||
#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
|
||||
#elif defined(__GNUC__)
|
||||
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
|
||||
#else
|
||||
#define CRYPTOPP_ALIGN_DATA(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_SECTION_ALIGN16
|
||||
#if defined(__GNUC__) && !defined(__APPLE__)
|
||||
// the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
|
||||
#define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
|
||||
#else
|
||||
#define CRYPTOPP_SECTION_ALIGN16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__fastcall)
|
||||
#define CRYPTOPP_FASTCALL __fastcall
|
||||
#else
|
||||
#define CRYPTOPP_FASTCALL
|
||||
#endif
|
||||
|
||||
// VC60 workaround: it doesn't allow typename in some places
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
#define CPP_TYPENAME
|
||||
#else
|
||||
#define CPP_TYPENAME typename
|
||||
#endif
|
||||
|
||||
// VC60 workaround: can't cast unsigned __int64 to float or double
|
||||
#if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
|
||||
#define CRYPTOPP_VC6_INT64 (__int64)
|
||||
#else
|
||||
#define CRYPTOPP_VC6_INT64
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define CRYPTOPP_NO_VTABLE __declspec(novtable)
|
||||
#else
|
||||
#define CRYPTOPP_NO_VTABLE
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// 4231: nonstandard extension used : 'extern' before template explicit instantiation
|
||||
// 4250: dominance
|
||||
// 4251: member needs to have dll-interface
|
||||
// 4275: base needs to have dll-interface
|
||||
// 4660: explicitly instantiating a class that's already implicitly instantiated
|
||||
// 4661: no suitable definition provided for explicit template instantiation request
|
||||
// 4786: identifer was truncated in debug information
|
||||
// 4355: 'this' : used in base member initializer list
|
||||
// 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
|
||||
# pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355 4910)
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
// 8037: non-const function called for const object. needed to work around BCB2006 bug
|
||||
# pragma warn -8037
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
|
||||
#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
|
||||
#define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_DISABLE_X86ASM // for backwards compatibility: this macro had both meanings
|
||||
#define CRYPTOPP_DISABLE_ASM
|
||||
#define CRYPTOPP_DISABLE_SSE2
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
|
||||
#define CRYPTOPP_X86_ASM_AVAILABLE
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300)
|
||||
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
// SSSE3 was actually introduced in GNU as 2.17, which was released 6/23/2006, but we can't tell what version of binutils is installed.
|
||||
// GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version.
|
||||
#if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102)
|
||||
#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
|
||||
#define CRYPTOPP_X64_MASM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
|
||||
#define CRYPTOPP_X64_ASM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__))
|
||||
#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
|
||||
#define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
|
||||
#endif
|
||||
|
||||
// how to allocate 16-byte aligned memory (for SSE2)
|
||||
#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
|
||||
#define CRYPTOPP_MM_MALLOC_AVAILABLE
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
|
||||
#elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
|
||||
#define CRYPTOPP_MEMALIGN_AVAILABLE
|
||||
#else
|
||||
#define CRYPTOPP_NO_ALIGNED_ALLOC
|
||||
#endif
|
||||
|
||||
// how to disable inlining
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1300
|
||||
# define CRYPTOPP_NOINLINE_DOTDOTDOT
|
||||
# define CRYPTOPP_NOINLINE __declspec(noinline)
|
||||
#elif defined(__GNUC__)
|
||||
# define CRYPTOPP_NOINLINE_DOTDOTDOT
|
||||
# define CRYPTOPP_NOINLINE __attribute__((noinline))
|
||||
#else
|
||||
# define CRYPTOPP_NOINLINE_DOTDOTDOT ...
|
||||
# define CRYPTOPP_NOINLINE
|
||||
#endif
|
||||
|
||||
// how to declare class constants
|
||||
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER)
|
||||
# define CRYPTOPP_CONSTANT(x) enum {x};
|
||||
#else
|
||||
# define CRYPTOPP_CONSTANT(x) static const int x;
|
||||
#endif
|
||||
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
#define CRYPTOPP_BOOL_X64 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_X64 0
|
||||
#endif
|
||||
|
||||
// see http://predef.sourceforge.net/prearch.html
|
||||
#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)
|
||||
#define CRYPTOPP_BOOL_X86 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_X86 0
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__)
|
||||
#define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
||||
#endif
|
||||
|
||||
#define CRYPTOPP_VERSION 560
|
||||
|
||||
// ***************** determine availability of OS features ********************
|
||||
|
||||
#ifndef NO_OS_DEPENDENCE
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define CRYPTOPP_WIN32_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
|
||||
#define CRYPTOPP_UNIX_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
|
||||
# define HIGHRES_TIMER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_UNIX_AVAILABLE
|
||||
# define HAS_BERKELEY_STYLE_SOCKETS
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
# define HAS_WINDOWS_STYLE_SOCKETS
|
||||
#endif
|
||||
|
||||
#if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
|
||||
# define SOCKETS_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
|
||||
# define USE_WINDOWS_STYLE_SOCKETS
|
||||
#else
|
||||
# define USE_BERKELEY_STYLE_SOCKETS
|
||||
#endif
|
||||
|
||||
#if defined(HIGHRES_TIMER_AVAILABLE) && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
|
||||
# define WINDOWS_PIPES_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
|
||||
# define NONBLOCKING_RNG_AVAILABLE
|
||||
# define OS_RNG_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
# define NONBLOCKING_RNG_AVAILABLE
|
||||
# define BLOCKING_RNG_AVAILABLE
|
||||
# define OS_RNG_AVAILABLE
|
||||
# define HAS_PTHREADS
|
||||
# define THREADS_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
# define HAS_WINTHREADS
|
||||
# define THREADS_AVAILABLE
|
||||
#endif
|
||||
|
||||
#endif // NO_OS_DEPENDENCE
|
||||
|
||||
// ***************** DLL related ********************
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
|
||||
#ifdef CRYPTOPP_EXPORTS
|
||||
#define CRYPTOPP_IS_DLL
|
||||
#define CRYPTOPP_DLL __declspec(dllexport)
|
||||
#elif defined(CRYPTOPP_IMPORTS)
|
||||
#define CRYPTOPP_IS_DLL
|
||||
#define CRYPTOPP_DLL __declspec(dllimport)
|
||||
#else
|
||||
#define CRYPTOPP_DLL
|
||||
#endif
|
||||
|
||||
#define CRYPTOPP_API __cdecl
|
||||
|
||||
#else // CRYPTOPP_WIN32_AVAILABLE
|
||||
|
||||
#define CRYPTOPP_DLL
|
||||
#define CRYPTOPP_API
|
||||
|
||||
#endif // CRYPTOPP_WIN32_AVAILABLE
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
|
||||
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
|
||||
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
|
||||
#else
|
||||
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
|
||||
#define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
|
||||
#else
|
||||
#define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
|
||||
#endif
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
|
||||
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
|
||||
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
|
||||
#else
|
||||
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
|
||||
#define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
|
||||
#else
|
||||
#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_CONFIG_H
|
||||
#define CRYPTOPP_CONFIG_H
|
||||
|
||||
//// Bitcoin: disable SSE2 on 32-bit
|
||||
#if !defined(_M_X64) && !defined(__x86_64__)
|
||||
#define CRYPTOPP_DISABLE_SSE2 1
|
||||
#endif
|
||||
//////////// end of Bitcoin changes
|
||||
|
||||
|
||||
// ***************** Important Settings ********************
|
||||
|
||||
// define this if running on a big-endian CPU
|
||||
#if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))
|
||||
# define IS_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
// define this if running on a little-endian CPU
|
||||
// big endian will be assumed if IS_LITTLE_ENDIAN is not defined
|
||||
#ifndef IS_BIG_ENDIAN
|
||||
# define IS_LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
// define this if you want to disable all OS-dependent features,
|
||||
// such as sockets and OS-provided random number generators
|
||||
// #define NO_OS_DEPENDENCE
|
||||
|
||||
// Define this to use features provided by Microsoft's CryptoAPI.
|
||||
// Currently the only feature used is random number generation.
|
||||
// This macro will be ignored if NO_OS_DEPENDENCE is defined.
|
||||
#define USE_MS_CRYPTOAPI
|
||||
|
||||
// Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used
|
||||
#ifndef DSA_1024_BIT_MODULUS_ONLY
|
||||
# define DSA_1024_BIT_MODULUS_ONLY 1
|
||||
#endif
|
||||
|
||||
// ***************** Less Important Settings ***************
|
||||
|
||||
// define this to retain (as much as possible) old deprecated function and class names
|
||||
// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
|
||||
|
||||
#define GZIP_OS_CODE 0
|
||||
|
||||
// Try this if your CPU has 256K internal cache or a slow multiply instruction
|
||||
// and you want a (possibly) faster IDEA implementation using log tables
|
||||
// #define IDEA_LARGECACHE
|
||||
|
||||
// Define this if, for the linear congruential RNG, you want to use
|
||||
// the original constants as specified in S.K. Park and K.W. Miller's
|
||||
// CACM paper.
|
||||
// #define LCRNG_ORIGINAL_NUMBERS
|
||||
|
||||
// choose which style of sockets to wrap (mostly useful for cygwin which has both)
|
||||
#define PREFER_BERKELEY_STYLE_SOCKETS
|
||||
// #define PREFER_WINDOWS_STYLE_SOCKETS
|
||||
|
||||
// set the name of Rijndael cipher, was "Rijndael" before version 5.3
|
||||
#define CRYPTOPP_RIJNDAEL_NAME "AES"
|
||||
|
||||
// ***************** Important Settings Again ********************
|
||||
// But the defaults should be ok.
|
||||
|
||||
// namespace support is now required
|
||||
#ifdef NO_NAMESPACE
|
||||
# error namespace support is now required
|
||||
#endif
|
||||
|
||||
// Define this to workaround a Microsoft CryptoAPI bug where
|
||||
// each call to CryptAcquireContext causes a 100 KB memory leak.
|
||||
// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
|
||||
#define WORKAROUND_MS_BUG_Q258000
|
||||
|
||||
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
|
||||
// Avoid putting "CryptoPP::" in front of everything in Doxygen output
|
||||
# define CryptoPP
|
||||
# define NAMESPACE_BEGIN(x)
|
||||
# define NAMESPACE_END
|
||||
// Get Doxygen to generate better documentation for these typedefs
|
||||
# define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
|
||||
#else
|
||||
# define NAMESPACE_BEGIN(x) namespace x {
|
||||
# define NAMESPACE_END }
|
||||
# define DOCUMENTED_TYPEDEF(x, y) typedef x y;
|
||||
#endif
|
||||
#define ANONYMOUS_NAMESPACE_BEGIN namespace {
|
||||
#define USING_NAMESPACE(x) using namespace x;
|
||||
#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
|
||||
#define DOCUMENTED_NAMESPACE_END }
|
||||
|
||||
// What is the type of the third parameter to bind?
|
||||
// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
|
||||
// Unfortunately there is no way to tell whether or not socklen_t is defined.
|
||||
// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
|
||||
#ifndef TYPE_OF_SOCKLEN_T
|
||||
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# define TYPE_OF_SOCKLEN_T int
|
||||
# else
|
||||
# define TYPE_OF_SOCKLEN_T ::socklen_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
|
||||
# define __USE_W32_SOCKETS
|
||||
#endif
|
||||
|
||||
typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
typedef unsigned short word16;
|
||||
typedef unsigned int word32;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
typedef unsigned __int64 word64;
|
||||
#define W64LIT(x) x##ui64
|
||||
#else
|
||||
typedef unsigned long long word64;
|
||||
#define W64LIT(x) x##ULL
|
||||
#endif
|
||||
|
||||
// define large word type, used for file offsets and such
|
||||
typedef word64 lword;
|
||||
const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
// define hword, word, and dword. these are used for multiprecision integer arithmetic
|
||||
// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
|
||||
#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
|
||||
typedef word32 hword;
|
||||
typedef word64 word;
|
||||
#else
|
||||
#define CRYPTOPP_NATIVE_DWORD_AVAILABLE
|
||||
#if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
|
||||
// GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
|
||||
// mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
|
||||
typedef word32 hword;
|
||||
typedef word64 word;
|
||||
typedef __uint128_t dword;
|
||||
typedef __uint128_t word128;
|
||||
#define CRYPTOPP_WORD128_AVAILABLE
|
||||
#else
|
||||
// if we're here, it means we're on a 64-bit CPU but we don't have a way to obtain 128-bit multiplication results
|
||||
typedef word16 hword;
|
||||
typedef word32 word;
|
||||
typedef word64 dword;
|
||||
#endif
|
||||
#else
|
||||
// being here means the native register size is probably 32 bits or less
|
||||
#define CRYPTOPP_BOOL_SLOW_WORD64 1
|
||||
typedef word16 hword;
|
||||
typedef word32 word;
|
||||
typedef word64 dword;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef CRYPTOPP_BOOL_SLOW_WORD64
|
||||
#define CRYPTOPP_BOOL_SLOW_WORD64 0
|
||||
#endif
|
||||
|
||||
const unsigned int WORD_SIZE = sizeof(word);
|
||||
const unsigned int WORD_BITS = WORD_SIZE * 8;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
|
||||
// This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
#define CRYPTOPP_L1_CACHE_LINE_SIZE 64
|
||||
#else
|
||||
// L1 cache line size is 32 on Pentium III and earlier
|
||||
#define CRYPTOPP_L1_CACHE_LINE_SIZE 32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER == 1200
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#if _MSC_VER > 1200 || defined(_mm_free)
|
||||
#define CRYPTOPP_MSVC6PP_OR_LATER // VC 6 processor pack or later
|
||||
#else
|
||||
#define CRYPTOPP_MSVC6_NO_PP // VC 6 without processor pack
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_ALIGN_DATA
|
||||
#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
|
||||
#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
|
||||
#elif defined(__GNUC__)
|
||||
#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
|
||||
#else
|
||||
#define CRYPTOPP_ALIGN_DATA(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_SECTION_ALIGN16
|
||||
#if defined(__GNUC__) && !defined(__APPLE__)
|
||||
// the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
|
||||
#define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
|
||||
#else
|
||||
#define CRYPTOPP_SECTION_ALIGN16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__fastcall)
|
||||
#define CRYPTOPP_FASTCALL __fastcall
|
||||
#else
|
||||
#define CRYPTOPP_FASTCALL
|
||||
#endif
|
||||
|
||||
// VC60 workaround: it doesn't allow typename in some places
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
#define CPP_TYPENAME
|
||||
#else
|
||||
#define CPP_TYPENAME typename
|
||||
#endif
|
||||
|
||||
// VC60 workaround: can't cast unsigned __int64 to float or double
|
||||
#if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
|
||||
#define CRYPTOPP_VC6_INT64 (__int64)
|
||||
#else
|
||||
#define CRYPTOPP_VC6_INT64
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define CRYPTOPP_NO_VTABLE __declspec(novtable)
|
||||
#else
|
||||
#define CRYPTOPP_NO_VTABLE
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// 4231: nonstandard extension used : 'extern' before template explicit instantiation
|
||||
// 4250: dominance
|
||||
// 4251: member needs to have dll-interface
|
||||
// 4275: base needs to have dll-interface
|
||||
// 4660: explicitly instantiating a class that's already implicitly instantiated
|
||||
// 4661: no suitable definition provided for explicit template instantiation request
|
||||
// 4786: identifer was truncated in debug information
|
||||
// 4355: 'this' : used in base member initializer list
|
||||
// 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
|
||||
# pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355 4910)
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
// 8037: non-const function called for const object. needed to work around BCB2006 bug
|
||||
# pragma warn -8037
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
|
||||
#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
|
||||
#define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_DISABLE_X86ASM // for backwards compatibility: this macro had both meanings
|
||||
#define CRYPTOPP_DISABLE_ASM
|
||||
#define CRYPTOPP_DISABLE_SSE2
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
|
||||
#define CRYPTOPP_X86_ASM_AVAILABLE
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300)
|
||||
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
// SSSE3 was actually introduced in GNU as 2.17, which was released 6/23/2006, but we can't tell what version of binutils is installed.
|
||||
// GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version.
|
||||
#if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102)
|
||||
#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
|
||||
#define CRYPTOPP_X64_MASM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
|
||||
#define CRYPTOPP_X64_ASM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__))
|
||||
#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
|
||||
#define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
|
||||
#endif
|
||||
|
||||
// how to allocate 16-byte aligned memory (for SSE2)
|
||||
#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
|
||||
#define CRYPTOPP_MM_MALLOC_AVAILABLE
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
|
||||
#elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
|
||||
#define CRYPTOPP_MEMALIGN_AVAILABLE
|
||||
#else
|
||||
#define CRYPTOPP_NO_ALIGNED_ALLOC
|
||||
#endif
|
||||
|
||||
// how to disable inlining
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1300
|
||||
# define CRYPTOPP_NOINLINE_DOTDOTDOT
|
||||
# define CRYPTOPP_NOINLINE __declspec(noinline)
|
||||
#elif defined(__GNUC__)
|
||||
# define CRYPTOPP_NOINLINE_DOTDOTDOT
|
||||
# define CRYPTOPP_NOINLINE __attribute__((noinline))
|
||||
#else
|
||||
# define CRYPTOPP_NOINLINE_DOTDOTDOT ...
|
||||
# define CRYPTOPP_NOINLINE
|
||||
#endif
|
||||
|
||||
// how to declare class constants
|
||||
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER)
|
||||
# define CRYPTOPP_CONSTANT(x) enum {x};
|
||||
#else
|
||||
# define CRYPTOPP_CONSTANT(x) static const int x;
|
||||
#endif
|
||||
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
#define CRYPTOPP_BOOL_X64 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_X64 0
|
||||
#endif
|
||||
|
||||
// see http://predef.sourceforge.net/prearch.html
|
||||
#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)
|
||||
#define CRYPTOPP_BOOL_X86 1
|
||||
#else
|
||||
#define CRYPTOPP_BOOL_X86 0
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__)
|
||||
#define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
||||
#endif
|
||||
|
||||
#define CRYPTOPP_VERSION 560
|
||||
|
||||
// ***************** determine availability of OS features ********************
|
||||
|
||||
#ifndef NO_OS_DEPENDENCE
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define CRYPTOPP_WIN32_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
|
||||
#define CRYPTOPP_UNIX_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
|
||||
# define HIGHRES_TIMER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_UNIX_AVAILABLE
|
||||
# define HAS_BERKELEY_STYLE_SOCKETS
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
# define HAS_WINDOWS_STYLE_SOCKETS
|
||||
#endif
|
||||
|
||||
#if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
|
||||
# define SOCKETS_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
|
||||
# define USE_WINDOWS_STYLE_SOCKETS
|
||||
#else
|
||||
# define USE_BERKELEY_STYLE_SOCKETS
|
||||
#endif
|
||||
|
||||
#if defined(HIGHRES_TIMER_AVAILABLE) && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
|
||||
# define WINDOWS_PIPES_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
|
||||
# define NONBLOCKING_RNG_AVAILABLE
|
||||
# define OS_RNG_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
# define NONBLOCKING_RNG_AVAILABLE
|
||||
# define BLOCKING_RNG_AVAILABLE
|
||||
# define OS_RNG_AVAILABLE
|
||||
# define HAS_PTHREADS
|
||||
# define THREADS_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
# define HAS_WINTHREADS
|
||||
# define THREADS_AVAILABLE
|
||||
#endif
|
||||
|
||||
#endif // NO_OS_DEPENDENCE
|
||||
|
||||
// ***************** DLL related ********************
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
|
||||
#ifdef CRYPTOPP_EXPORTS
|
||||
#define CRYPTOPP_IS_DLL
|
||||
#define CRYPTOPP_DLL __declspec(dllexport)
|
||||
#elif defined(CRYPTOPP_IMPORTS)
|
||||
#define CRYPTOPP_IS_DLL
|
||||
#define CRYPTOPP_DLL __declspec(dllimport)
|
||||
#else
|
||||
#define CRYPTOPP_DLL
|
||||
#endif
|
||||
|
||||
#define CRYPTOPP_API __cdecl
|
||||
|
||||
#else // CRYPTOPP_WIN32_AVAILABLE
|
||||
|
||||
#define CRYPTOPP_DLL
|
||||
#define CRYPTOPP_API
|
||||
|
||||
#endif // CRYPTOPP_WIN32_AVAILABLE
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
|
||||
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
|
||||
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
|
||||
#else
|
||||
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
|
||||
#define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
|
||||
#else
|
||||
#define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
|
||||
#endif
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
|
||||
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
|
||||
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
|
||||
#else
|
||||
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
|
||||
#define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
|
||||
#else
|
||||
#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,199 +1,199 @@
|
||||
// cpu.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
#ifndef CRYPTOPP_IMPORTS
|
||||
|
||||
#include "cpu.h"
|
||||
#include "misc.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_MSVC6PP_OR_LATER
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#ifdef CRYPTOPP_X86_ASM_AVAILABLE
|
||||
|
||||
#ifndef _MSC_VER
|
||||
typedef void (*SigHandler)(int);
|
||||
|
||||
static jmp_buf s_jmpNoCPUID;
|
||||
static void SigIllHandlerCPUID(int)
|
||||
{
|
||||
longjmp(s_jmpNoCPUID, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool CpuId(word32 input, word32 *output)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
__try
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, input
|
||||
cpuid
|
||||
mov edi, output
|
||||
mov [edi], eax
|
||||
mov [edi+4], ebx
|
||||
mov [edi+8], ecx
|
||||
mov [edi+12], edx
|
||||
}
|
||||
}
|
||||
__except (1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
SigHandler oldHandler = signal(SIGILL, SigIllHandlerCPUID);
|
||||
if (oldHandler == SIG_ERR)
|
||||
return false;
|
||||
|
||||
bool result = true;
|
||||
if (setjmp(s_jmpNoCPUID))
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
__asm__
|
||||
(
|
||||
// save ebx in case -fPIC is being used
|
||||
#if CRYPTOPP_BOOL_X86
|
||||
"push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx"
|
||||
#else
|
||||
"pushq %%rbx; cpuid; mov %%ebx, %%edi; popq %%rbx"
|
||||
#endif
|
||||
: "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d" (output[3])
|
||||
: "a" (input)
|
||||
);
|
||||
}
|
||||
|
||||
signal(SIGILL, oldHandler);
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
static jmp_buf s_jmpNoSSE2;
|
||||
static void SigIllHandlerSSE2(int)
|
||||
{
|
||||
longjmp(s_jmpNoSSE2, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif _MSC_VER >= 1400 && CRYPTOPP_BOOL_X64
|
||||
|
||||
bool CpuId(word32 input, word32 *output)
|
||||
{
|
||||
__cpuid((int *)output, input);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_CPUID_AVAILABLE
|
||||
|
||||
static bool TrySSE2()
|
||||
{
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
return true;
|
||||
#elif defined(_MSC_VER)
|
||||
__try
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
||||
AS2(por xmm0, xmm0) // executing SSE2 instruction
|
||||
#elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
__mm128i x = _mm_setzero_si128();
|
||||
return _mm_cvtsi128_si32(x) == 0;
|
||||
#endif
|
||||
}
|
||||
__except (1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#elif defined(__GNUC__)
|
||||
SigHandler oldHandler = signal(SIGILL, SigIllHandlerSSE2);
|
||||
if (oldHandler == SIG_ERR)
|
||||
return false;
|
||||
|
||||
bool result = true;
|
||||
if (setjmp(s_jmpNoSSE2))
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
||||
__asm __volatile ("por %xmm0, %xmm0");
|
||||
#elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
__mm128i x = _mm_setzero_si128();
|
||||
result = _mm_cvtsi128_si32(x) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
signal(SIGILL, oldHandler);
|
||||
return result;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool g_x86DetectionDone = false;
|
||||
bool g_hasISSE = false, g_hasSSE2 = false, g_hasSSSE3 = false, g_hasMMX = false, g_isP4 = false;
|
||||
word32 g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||
|
||||
void DetectX86Features()
|
||||
{
|
||||
word32 cpuid[4], cpuid1[4];
|
||||
if (!CpuId(0, cpuid))
|
||||
return;
|
||||
if (!CpuId(1, cpuid1))
|
||||
return;
|
||||
|
||||
g_hasMMX = (cpuid1[3] & (1 << 23)) != 0;
|
||||
if ((cpuid1[3] & (1 << 26)) != 0)
|
||||
g_hasSSE2 = TrySSE2();
|
||||
g_hasSSSE3 = g_hasSSE2 && (cpuid1[2] & (1<<9));
|
||||
|
||||
if ((cpuid1[3] & (1 << 25)) != 0)
|
||||
g_hasISSE = true;
|
||||
else
|
||||
{
|
||||
word32 cpuid2[4];
|
||||
CpuId(0x080000000, cpuid2);
|
||||
if (cpuid2[0] >= 0x080000001)
|
||||
{
|
||||
CpuId(0x080000001, cpuid2);
|
||||
g_hasISSE = (cpuid2[3] & (1 << 22)) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::swap(cpuid[2], cpuid[3]);
|
||||
if (memcmp(cpuid+1, "GenuineIntel", 12) == 0)
|
||||
{
|
||||
g_isP4 = ((cpuid1[0] >> 8) & 0xf) == 0xf;
|
||||
g_cacheLineSize = 8 * GETBYTE(cpuid1[1], 1);
|
||||
}
|
||||
else if (memcmp(cpuid+1, "AuthenticAMD", 12) == 0)
|
||||
{
|
||||
CpuId(0x80000005, cpuid);
|
||||
g_cacheLineSize = GETBYTE(cpuid[2], 0);
|
||||
}
|
||||
|
||||
if (!g_cacheLineSize)
|
||||
g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||
|
||||
g_x86DetectionDone = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
// cpu.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
#ifndef CRYPTOPP_IMPORTS
|
||||
|
||||
#include "cpu.h"
|
||||
#include "misc.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_MSVC6PP_OR_LATER
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#ifdef CRYPTOPP_X86_ASM_AVAILABLE
|
||||
|
||||
#ifndef _MSC_VER
|
||||
typedef void (*SigHandler)(int);
|
||||
|
||||
static jmp_buf s_jmpNoCPUID;
|
||||
static void SigIllHandlerCPUID(int)
|
||||
{
|
||||
longjmp(s_jmpNoCPUID, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool CpuId(word32 input, word32 *output)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
__try
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, input
|
||||
cpuid
|
||||
mov edi, output
|
||||
mov [edi], eax
|
||||
mov [edi+4], ebx
|
||||
mov [edi+8], ecx
|
||||
mov [edi+12], edx
|
||||
}
|
||||
}
|
||||
__except (1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
SigHandler oldHandler = signal(SIGILL, SigIllHandlerCPUID);
|
||||
if (oldHandler == SIG_ERR)
|
||||
return false;
|
||||
|
||||
bool result = true;
|
||||
if (setjmp(s_jmpNoCPUID))
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
__asm__
|
||||
(
|
||||
// save ebx in case -fPIC is being used
|
||||
#if CRYPTOPP_BOOL_X86
|
||||
"push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx"
|
||||
#else
|
||||
"pushq %%rbx; cpuid; mov %%ebx, %%edi; popq %%rbx"
|
||||
#endif
|
||||
: "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d" (output[3])
|
||||
: "a" (input)
|
||||
);
|
||||
}
|
||||
|
||||
signal(SIGILL, oldHandler);
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
static jmp_buf s_jmpNoSSE2;
|
||||
static void SigIllHandlerSSE2(int)
|
||||
{
|
||||
longjmp(s_jmpNoSSE2, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif _MSC_VER >= 1400 && CRYPTOPP_BOOL_X64
|
||||
|
||||
bool CpuId(word32 input, word32 *output)
|
||||
{
|
||||
__cpuid((int *)output, input);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_CPUID_AVAILABLE
|
||||
|
||||
static bool TrySSE2()
|
||||
{
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
return true;
|
||||
#elif defined(_MSC_VER)
|
||||
__try
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
||||
AS2(por xmm0, xmm0) // executing SSE2 instruction
|
||||
#elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
__mm128i x = _mm_setzero_si128();
|
||||
return _mm_cvtsi128_si32(x) == 0;
|
||||
#endif
|
||||
}
|
||||
__except (1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#elif defined(__GNUC__)
|
||||
SigHandler oldHandler = signal(SIGILL, SigIllHandlerSSE2);
|
||||
if (oldHandler == SIG_ERR)
|
||||
return false;
|
||||
|
||||
bool result = true;
|
||||
if (setjmp(s_jmpNoSSE2))
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
||||
__asm __volatile ("por %xmm0, %xmm0");
|
||||
#elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
__mm128i x = _mm_setzero_si128();
|
||||
result = _mm_cvtsi128_si32(x) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
signal(SIGILL, oldHandler);
|
||||
return result;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool g_x86DetectionDone = false;
|
||||
bool g_hasISSE = false, g_hasSSE2 = false, g_hasSSSE3 = false, g_hasMMX = false, g_isP4 = false;
|
||||
word32 g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||
|
||||
void DetectX86Features()
|
||||
{
|
||||
word32 cpuid[4], cpuid1[4];
|
||||
if (!CpuId(0, cpuid))
|
||||
return;
|
||||
if (!CpuId(1, cpuid1))
|
||||
return;
|
||||
|
||||
g_hasMMX = (cpuid1[3] & (1 << 23)) != 0;
|
||||
if ((cpuid1[3] & (1 << 26)) != 0)
|
||||
g_hasSSE2 = TrySSE2();
|
||||
g_hasSSSE3 = g_hasSSE2 && (cpuid1[2] & (1<<9));
|
||||
|
||||
if ((cpuid1[3] & (1 << 25)) != 0)
|
||||
g_hasISSE = true;
|
||||
else
|
||||
{
|
||||
word32 cpuid2[4];
|
||||
CpuId(0x080000000, cpuid2);
|
||||
if (cpuid2[0] >= 0x080000001)
|
||||
{
|
||||
CpuId(0x080000001, cpuid2);
|
||||
g_hasISSE = (cpuid2[3] & (1 << 22)) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::swap(cpuid[2], cpuid[3]);
|
||||
if (memcmp(cpuid+1, "GenuineIntel", 12) == 0)
|
||||
{
|
||||
g_isP4 = ((cpuid1[0] >> 8) & 0xf) == 0xf;
|
||||
g_cacheLineSize = 8 * GETBYTE(cpuid1[1], 1);
|
||||
}
|
||||
else if (memcmp(cpuid+1, "AuthenticAMD", 12) == 0)
|
||||
{
|
||||
CpuId(0x80000005, cpuid);
|
||||
g_cacheLineSize = GETBYTE(cpuid[2], 0);
|
||||
}
|
||||
|
||||
if (!g_cacheLineSize)
|
||||
g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||
|
||||
g_x86DetectionDone = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -1,263 +1,263 @@
|
||||
#ifndef CRYPTOPP_CPU_H
|
||||
#define CRYPTOPP_CPU_H
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
|
||||
#define CRYPTOPP_X86_ASM_AVAILABLE
|
||||
#define CRYPTOPP_BOOL_X64 1
|
||||
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
|
||||
#define NAMESPACE_END
|
||||
|
||||
#else
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef CRYPTOPP_MSVC6PP_OR_LATER
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || (_MSC_VER >= 1400 && CRYPTOPP_BOOL_X64)
|
||||
|
||||
#define CRYPTOPP_CPUID_AVAILABLE
|
||||
|
||||
// these should not be used directly
|
||||
extern CRYPTOPP_DLL bool g_x86DetectionDone;
|
||||
extern CRYPTOPP_DLL bool g_hasSSE2;
|
||||
extern CRYPTOPP_DLL bool g_hasISSE;
|
||||
extern CRYPTOPP_DLL bool g_hasMMX;
|
||||
extern CRYPTOPP_DLL bool g_hasSSSE3;
|
||||
extern CRYPTOPP_DLL bool g_isP4;
|
||||
extern CRYPTOPP_DLL word32 g_cacheLineSize;
|
||||
CRYPTOPP_DLL void CRYPTOPP_API DetectX86Features();
|
||||
|
||||
CRYPTOPP_DLL bool CRYPTOPP_API CpuId(word32 input, word32 *output);
|
||||
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
inline bool HasSSE2() {return true;}
|
||||
inline bool HasISSE() {return true;}
|
||||
inline bool HasMMX() {return true;}
|
||||
#else
|
||||
|
||||
inline bool HasSSE2()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasSSE2;
|
||||
}
|
||||
|
||||
inline bool HasISSE()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasISSE;
|
||||
}
|
||||
|
||||
inline bool HasMMX()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasMMX;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
inline bool HasSSSE3()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasSSSE3;
|
||||
}
|
||||
|
||||
inline bool IsP4()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_isP4;
|
||||
}
|
||||
|
||||
inline int GetCacheLineSize()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_cacheLineSize;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline int GetCacheLineSize()
|
||||
{
|
||||
return CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||
}
|
||||
|
||||
inline bool HasSSSE3() {return false;}
|
||||
inline bool IsP4() {return false;}
|
||||
|
||||
// assume MMX and SSE2 if intrinsics are enabled
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_X64
|
||||
inline bool HasSSE2() {return true;}
|
||||
inline bool HasISSE() {return true;}
|
||||
inline bool HasMMX() {return true;}
|
||||
#else
|
||||
inline bool HasSSE2() {return false;}
|
||||
inline bool HasISSE() {return false;}
|
||||
inline bool HasMMX() {return false;}
|
||||
#endif
|
||||
|
||||
#endif // #ifdef CRYPTOPP_X86_ASM_AVAILABLE || _MSC_VER >= 1400
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
#define AS1(x) x*newline*
|
||||
#define AS2(x, y) x, y*newline*
|
||||
#define AS3(x, y, z) x, y, z*newline*
|
||||
#define ASS(x, y, a, b, c, d) x, y, a*64+b*16+c*4+d*newline*
|
||||
#define ASL(x) label##x:*newline*
|
||||
#define ASJ(x, y, z) x label##y*newline*
|
||||
#define ASC(x, y) x label##y*newline*
|
||||
#define AS_HEX(y) 0##y##h
|
||||
#elif defined(__GNUC__)
|
||||
// define these in two steps to allow arguments to be expanded
|
||||
#define GNU_AS1(x) #x ";"
|
||||
#define GNU_AS2(x, y) #x ", " #y ";"
|
||||
#define GNU_AS3(x, y, z) #x ", " #y ", " #z ";"
|
||||
#define GNU_ASL(x) "\n" #x ":"
|
||||
#define GNU_ASJ(x, y, z) #x " " #y #z ";"
|
||||
#define AS1(x) GNU_AS1(x)
|
||||
#define AS2(x, y) GNU_AS2(x, y)
|
||||
#define AS3(x, y, z) GNU_AS3(x, y, z)
|
||||
#define ASS(x, y, a, b, c, d) #x ", " #y ", " #a "*64+" #b "*16+" #c "*4+" #d ";"
|
||||
#define ASL(x) GNU_ASL(x)
|
||||
#define ASJ(x, y, z) GNU_ASJ(x, y, z)
|
||||
#define ASC(x, y) #x " " #y ";"
|
||||
#define CRYPTOPP_NAKED
|
||||
#define AS_HEX(y) 0x##y
|
||||
#else
|
||||
#define AS1(x) __asm {x}
|
||||
#define AS2(x, y) __asm {x, y}
|
||||
#define AS3(x, y, z) __asm {x, y, z}
|
||||
#define ASS(x, y, a, b, c, d) __asm {x, y, _MM_SHUFFLE(a, b, c, d)}
|
||||
#define ASL(x) __asm {label##x:}
|
||||
#define ASJ(x, y, z) __asm {x label##y}
|
||||
#define ASC(x, y) __asm {x label##y}
|
||||
#define CRYPTOPP_NAKED __declspec(naked)
|
||||
#define AS_HEX(y) 0x##y
|
||||
#endif
|
||||
|
||||
#define IF0(y)
|
||||
#define IF1(y) y
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
#define ASM_MOD(x, y) ((x) MOD (y))
|
||||
#define XMMWORD_PTR XMMWORD PTR
|
||||
#else
|
||||
// GNU assembler doesn't seem to have mod operator
|
||||
#define ASM_MOD(x, y) ((x)-((x)/(y))*(y))
|
||||
// GAS 2.15 doesn't support XMMWORD PTR. it seems necessary only for MASM
|
||||
#define XMMWORD_PTR
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X86
|
||||
#define AS_REG_1 ecx
|
||||
#define AS_REG_2 edx
|
||||
#define AS_REG_3 esi
|
||||
#define AS_REG_4 edi
|
||||
#define AS_REG_5 eax
|
||||
#define AS_REG_6 ebx
|
||||
#define AS_REG_7 ebp
|
||||
#define AS_REG_1d ecx
|
||||
#define AS_REG_2d edx
|
||||
#define AS_REG_3d esi
|
||||
#define AS_REG_4d edi
|
||||
#define AS_REG_5d eax
|
||||
#define AS_REG_6d ebx
|
||||
#define AS_REG_7d ebp
|
||||
#define WORD_SZ 4
|
||||
#define WORD_REG(x) e##x
|
||||
#define WORD_PTR DWORD PTR
|
||||
#define AS_PUSH_IF86(x) AS1(push e##x)
|
||||
#define AS_POP_IF86(x) AS1(pop e##x)
|
||||
#define AS_JCXZ jecxz
|
||||
#elif CRYPTOPP_BOOL_X64
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
#define AS_REG_1 rcx
|
||||
#define AS_REG_2 rdx
|
||||
#define AS_REG_3 r8
|
||||
#define AS_REG_4 r9
|
||||
#define AS_REG_5 rax
|
||||
#define AS_REG_6 r10
|
||||
#define AS_REG_7 r11
|
||||
#define AS_REG_1d ecx
|
||||
#define AS_REG_2d edx
|
||||
#define AS_REG_3d r8d
|
||||
#define AS_REG_4d r9d
|
||||
#define AS_REG_5d eax
|
||||
#define AS_REG_6d r10d
|
||||
#define AS_REG_7d r11d
|
||||
#else
|
||||
#define AS_REG_1 rdi
|
||||
#define AS_REG_2 rsi
|
||||
#define AS_REG_3 rdx
|
||||
#define AS_REG_4 rcx
|
||||
#define AS_REG_5 r8
|
||||
#define AS_REG_6 r9
|
||||
#define AS_REG_7 r10
|
||||
#define AS_REG_1d edi
|
||||
#define AS_REG_2d esi
|
||||
#define AS_REG_3d edx
|
||||
#define AS_REG_4d ecx
|
||||
#define AS_REG_5d r8d
|
||||
#define AS_REG_6d r9d
|
||||
#define AS_REG_7d r10d
|
||||
#endif
|
||||
#define WORD_SZ 8
|
||||
#define WORD_REG(x) r##x
|
||||
#define WORD_PTR QWORD PTR
|
||||
#define AS_PUSH_IF86(x)
|
||||
#define AS_POP_IF86(x)
|
||||
#define AS_JCXZ jrcxz
|
||||
#endif
|
||||
|
||||
// helper macro for stream cipher output
|
||||
#define AS_XMM_OUTPUT4(labelPrefix, inputPtr, outputPtr, x0, x1, x2, x3, t, p0, p1, p2, p3, increment)\
|
||||
AS2( test inputPtr, inputPtr)\
|
||||
ASC( jz, labelPrefix##3)\
|
||||
AS2( test inputPtr, 15)\
|
||||
ASC( jnz, labelPrefix##7)\
|
||||
AS2( pxor xmm##x0, [inputPtr+p0*16])\
|
||||
AS2( pxor xmm##x1, [inputPtr+p1*16])\
|
||||
AS2( pxor xmm##x2, [inputPtr+p2*16])\
|
||||
AS2( pxor xmm##x3, [inputPtr+p3*16])\
|
||||
AS2( add inputPtr, increment*16)\
|
||||
ASC( jmp, labelPrefix##3)\
|
||||
ASL(labelPrefix##7)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p0*16])\
|
||||
AS2( pxor xmm##x0, xmm##t)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p1*16])\
|
||||
AS2( pxor xmm##x1, xmm##t)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p2*16])\
|
||||
AS2( pxor xmm##x2, xmm##t)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p3*16])\
|
||||
AS2( pxor xmm##x3, xmm##t)\
|
||||
AS2( add inputPtr, increment*16)\
|
||||
ASL(labelPrefix##3)\
|
||||
AS2( test outputPtr, 15)\
|
||||
ASC( jnz, labelPrefix##8)\
|
||||
AS2( movdqa [outputPtr+p0*16], xmm##x0)\
|
||||
AS2( movdqa [outputPtr+p1*16], xmm##x1)\
|
||||
AS2( movdqa [outputPtr+p2*16], xmm##x2)\
|
||||
AS2( movdqa [outputPtr+p3*16], xmm##x3)\
|
||||
ASC( jmp, labelPrefix##9)\
|
||||
ASL(labelPrefix##8)\
|
||||
AS2( movdqu [outputPtr+p0*16], xmm##x0)\
|
||||
AS2( movdqu [outputPtr+p1*16], xmm##x1)\
|
||||
AS2( movdqu [outputPtr+p2*16], xmm##x2)\
|
||||
AS2( movdqu [outputPtr+p3*16], xmm##x3)\
|
||||
ASL(labelPrefix##9)\
|
||||
AS2( add outputPtr, increment*16)
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_CPU_H
|
||||
#define CRYPTOPP_CPU_H
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
|
||||
#define CRYPTOPP_X86_ASM_AVAILABLE
|
||||
#define CRYPTOPP_BOOL_X64 1
|
||||
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
|
||||
#define NAMESPACE_END
|
||||
|
||||
#else
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef CRYPTOPP_MSVC6PP_OR_LATER
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || (_MSC_VER >= 1400 && CRYPTOPP_BOOL_X64)
|
||||
|
||||
#define CRYPTOPP_CPUID_AVAILABLE
|
||||
|
||||
// these should not be used directly
|
||||
extern CRYPTOPP_DLL bool g_x86DetectionDone;
|
||||
extern CRYPTOPP_DLL bool g_hasSSE2;
|
||||
extern CRYPTOPP_DLL bool g_hasISSE;
|
||||
extern CRYPTOPP_DLL bool g_hasMMX;
|
||||
extern CRYPTOPP_DLL bool g_hasSSSE3;
|
||||
extern CRYPTOPP_DLL bool g_isP4;
|
||||
extern CRYPTOPP_DLL word32 g_cacheLineSize;
|
||||
CRYPTOPP_DLL void CRYPTOPP_API DetectX86Features();
|
||||
|
||||
CRYPTOPP_DLL bool CRYPTOPP_API CpuId(word32 input, word32 *output);
|
||||
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
inline bool HasSSE2() {return true;}
|
||||
inline bool HasISSE() {return true;}
|
||||
inline bool HasMMX() {return true;}
|
||||
#else
|
||||
|
||||
inline bool HasSSE2()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasSSE2;
|
||||
}
|
||||
|
||||
inline bool HasISSE()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasISSE;
|
||||
}
|
||||
|
||||
inline bool HasMMX()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasMMX;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
inline bool HasSSSE3()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_hasSSSE3;
|
||||
}
|
||||
|
||||
inline bool IsP4()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_isP4;
|
||||
}
|
||||
|
||||
inline int GetCacheLineSize()
|
||||
{
|
||||
if (!g_x86DetectionDone)
|
||||
DetectX86Features();
|
||||
return g_cacheLineSize;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline int GetCacheLineSize()
|
||||
{
|
||||
return CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||
}
|
||||
|
||||
inline bool HasSSSE3() {return false;}
|
||||
inline bool IsP4() {return false;}
|
||||
|
||||
// assume MMX and SSE2 if intrinsics are enabled
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_X64
|
||||
inline bool HasSSE2() {return true;}
|
||||
inline bool HasISSE() {return true;}
|
||||
inline bool HasMMX() {return true;}
|
||||
#else
|
||||
inline bool HasSSE2() {return false;}
|
||||
inline bool HasISSE() {return false;}
|
||||
inline bool HasMMX() {return false;}
|
||||
#endif
|
||||
|
||||
#endif // #ifdef CRYPTOPP_X86_ASM_AVAILABLE || _MSC_VER >= 1400
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
#define AS1(x) x*newline*
|
||||
#define AS2(x, y) x, y*newline*
|
||||
#define AS3(x, y, z) x, y, z*newline*
|
||||
#define ASS(x, y, a, b, c, d) x, y, a*64+b*16+c*4+d*newline*
|
||||
#define ASL(x) label##x:*newline*
|
||||
#define ASJ(x, y, z) x label##y*newline*
|
||||
#define ASC(x, y) x label##y*newline*
|
||||
#define AS_HEX(y) 0##y##h
|
||||
#elif defined(__GNUC__)
|
||||
// define these in two steps to allow arguments to be expanded
|
||||
#define GNU_AS1(x) #x ";"
|
||||
#define GNU_AS2(x, y) #x ", " #y ";"
|
||||
#define GNU_AS3(x, y, z) #x ", " #y ", " #z ";"
|
||||
#define GNU_ASL(x) "\n" #x ":"
|
||||
#define GNU_ASJ(x, y, z) #x " " #y #z ";"
|
||||
#define AS1(x) GNU_AS1(x)
|
||||
#define AS2(x, y) GNU_AS2(x, y)
|
||||
#define AS3(x, y, z) GNU_AS3(x, y, z)
|
||||
#define ASS(x, y, a, b, c, d) #x ", " #y ", " #a "*64+" #b "*16+" #c "*4+" #d ";"
|
||||
#define ASL(x) GNU_ASL(x)
|
||||
#define ASJ(x, y, z) GNU_ASJ(x, y, z)
|
||||
#define ASC(x, y) #x " " #y ";"
|
||||
#define CRYPTOPP_NAKED
|
||||
#define AS_HEX(y) 0x##y
|
||||
#else
|
||||
#define AS1(x) __asm {x}
|
||||
#define AS2(x, y) __asm {x, y}
|
||||
#define AS3(x, y, z) __asm {x, y, z}
|
||||
#define ASS(x, y, a, b, c, d) __asm {x, y, _MM_SHUFFLE(a, b, c, d)}
|
||||
#define ASL(x) __asm {label##x:}
|
||||
#define ASJ(x, y, z) __asm {x label##y}
|
||||
#define ASC(x, y) __asm {x label##y}
|
||||
#define CRYPTOPP_NAKED __declspec(naked)
|
||||
#define AS_HEX(y) 0x##y
|
||||
#endif
|
||||
|
||||
#define IF0(y)
|
||||
#define IF1(y) y
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
#define ASM_MOD(x, y) ((x) MOD (y))
|
||||
#define XMMWORD_PTR XMMWORD PTR
|
||||
#else
|
||||
// GNU assembler doesn't seem to have mod operator
|
||||
#define ASM_MOD(x, y) ((x)-((x)/(y))*(y))
|
||||
// GAS 2.15 doesn't support XMMWORD PTR. it seems necessary only for MASM
|
||||
#define XMMWORD_PTR
|
||||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_X86
|
||||
#define AS_REG_1 ecx
|
||||
#define AS_REG_2 edx
|
||||
#define AS_REG_3 esi
|
||||
#define AS_REG_4 edi
|
||||
#define AS_REG_5 eax
|
||||
#define AS_REG_6 ebx
|
||||
#define AS_REG_7 ebp
|
||||
#define AS_REG_1d ecx
|
||||
#define AS_REG_2d edx
|
||||
#define AS_REG_3d esi
|
||||
#define AS_REG_4d edi
|
||||
#define AS_REG_5d eax
|
||||
#define AS_REG_6d ebx
|
||||
#define AS_REG_7d ebp
|
||||
#define WORD_SZ 4
|
||||
#define WORD_REG(x) e##x
|
||||
#define WORD_PTR DWORD PTR
|
||||
#define AS_PUSH_IF86(x) AS1(push e##x)
|
||||
#define AS_POP_IF86(x) AS1(pop e##x)
|
||||
#define AS_JCXZ jecxz
|
||||
#elif CRYPTOPP_BOOL_X64
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
#define AS_REG_1 rcx
|
||||
#define AS_REG_2 rdx
|
||||
#define AS_REG_3 r8
|
||||
#define AS_REG_4 r9
|
||||
#define AS_REG_5 rax
|
||||
#define AS_REG_6 r10
|
||||
#define AS_REG_7 r11
|
||||
#define AS_REG_1d ecx
|
||||
#define AS_REG_2d edx
|
||||
#define AS_REG_3d r8d
|
||||
#define AS_REG_4d r9d
|
||||
#define AS_REG_5d eax
|
||||
#define AS_REG_6d r10d
|
||||
#define AS_REG_7d r11d
|
||||
#else
|
||||
#define AS_REG_1 rdi
|
||||
#define AS_REG_2 rsi
|
||||
#define AS_REG_3 rdx
|
||||
#define AS_REG_4 rcx
|
||||
#define AS_REG_5 r8
|
||||
#define AS_REG_6 r9
|
||||
#define AS_REG_7 r10
|
||||
#define AS_REG_1d edi
|
||||
#define AS_REG_2d esi
|
||||
#define AS_REG_3d edx
|
||||
#define AS_REG_4d ecx
|
||||
#define AS_REG_5d r8d
|
||||
#define AS_REG_6d r9d
|
||||
#define AS_REG_7d r10d
|
||||
#endif
|
||||
#define WORD_SZ 8
|
||||
#define WORD_REG(x) r##x
|
||||
#define WORD_PTR QWORD PTR
|
||||
#define AS_PUSH_IF86(x)
|
||||
#define AS_POP_IF86(x)
|
||||
#define AS_JCXZ jrcxz
|
||||
#endif
|
||||
|
||||
// helper macro for stream cipher output
|
||||
#define AS_XMM_OUTPUT4(labelPrefix, inputPtr, outputPtr, x0, x1, x2, x3, t, p0, p1, p2, p3, increment)\
|
||||
AS2( test inputPtr, inputPtr)\
|
||||
ASC( jz, labelPrefix##3)\
|
||||
AS2( test inputPtr, 15)\
|
||||
ASC( jnz, labelPrefix##7)\
|
||||
AS2( pxor xmm##x0, [inputPtr+p0*16])\
|
||||
AS2( pxor xmm##x1, [inputPtr+p1*16])\
|
||||
AS2( pxor xmm##x2, [inputPtr+p2*16])\
|
||||
AS2( pxor xmm##x3, [inputPtr+p3*16])\
|
||||
AS2( add inputPtr, increment*16)\
|
||||
ASC( jmp, labelPrefix##3)\
|
||||
ASL(labelPrefix##7)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p0*16])\
|
||||
AS2( pxor xmm##x0, xmm##t)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p1*16])\
|
||||
AS2( pxor xmm##x1, xmm##t)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p2*16])\
|
||||
AS2( pxor xmm##x2, xmm##t)\
|
||||
AS2( movdqu xmm##t, [inputPtr+p3*16])\
|
||||
AS2( pxor xmm##x3, xmm##t)\
|
||||
AS2( add inputPtr, increment*16)\
|
||||
ASL(labelPrefix##3)\
|
||||
AS2( test outputPtr, 15)\
|
||||
ASC( jnz, labelPrefix##8)\
|
||||
AS2( movdqa [outputPtr+p0*16], xmm##x0)\
|
||||
AS2( movdqa [outputPtr+p1*16], xmm##x1)\
|
||||
AS2( movdqa [outputPtr+p2*16], xmm##x2)\
|
||||
AS2( movdqa [outputPtr+p3*16], xmm##x3)\
|
||||
ASC( jmp, labelPrefix##9)\
|
||||
ASL(labelPrefix##8)\
|
||||
AS2( movdqu [outputPtr+p0*16], xmm##x0)\
|
||||
AS2( movdqu [outputPtr+p1*16], xmm##x1)\
|
||||
AS2( movdqu [outputPtr+p2*16], xmm##x2)\
|
||||
AS2( movdqu [outputPtr+p3*16], xmm##x3)\
|
||||
ASL(labelPrefix##9)\
|
||||
AS2( add outputPtr, increment*16)
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -1,29 +1,29 @@
|
||||
#ifndef CRYPTOPP_ITERHASH_H
|
||||
#define CRYPTOPP_ITERHASH_H
|
||||
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
// *** trimmed down dependency from iterhash.h ***
|
||||
template <class T_HashWordType, class T_Endianness, unsigned int T_BlockSize, unsigned int T_StateSize, class T_Transform, unsigned int T_DigestSize = 0, bool T_StateAligned = false>
|
||||
class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize)
|
||||
unsigned int DigestSize() const {return DIGESTSIZE;};
|
||||
typedef T_HashWordType HashWordType;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize)
|
||||
|
||||
protected:
|
||||
IteratedHashWithStaticTransform() {this->Init();}
|
||||
void HashEndianCorrectedBlock(const T_HashWordType *data) {T_Transform::Transform(this->m_state, data);}
|
||||
void Init() {T_Transform::InitState(this->m_state);}
|
||||
|
||||
T_HashWordType* StateBuf() {return this->m_state;}
|
||||
FixedSizeAlignedSecBlock<T_HashWordType, T_BlockSize/sizeof(T_HashWordType), T_StateAligned> m_state;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_ITERHASH_H
|
||||
#define CRYPTOPP_ITERHASH_H
|
||||
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
// *** trimmed down dependency from iterhash.h ***
|
||||
template <class T_HashWordType, class T_Endianness, unsigned int T_BlockSize, unsigned int T_StateSize, class T_Transform, unsigned int T_DigestSize = 0, bool T_StateAligned = false>
|
||||
class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize)
|
||||
unsigned int DigestSize() const {return DIGESTSIZE;};
|
||||
typedef T_HashWordType HashWordType;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize)
|
||||
|
||||
protected:
|
||||
IteratedHashWithStaticTransform() {this->Init();}
|
||||
void HashEndianCorrectedBlock(const T_HashWordType *data) {T_Transform::Transform(this->m_state, data);}
|
||||
void Init() {T_Transform::InitState(this->m_state);}
|
||||
|
||||
T_HashWordType* StateBuf() {return this->m_state;}
|
||||
FixedSizeAlignedSecBlock<T_HashWordType, T_BlockSize/sizeof(T_HashWordType), T_StateAligned> m_state;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
2
src/cryptopp/obj/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
@@ -1,21 +1,21 @@
|
||||
#ifndef CRYPTOPP_PCH_H
|
||||
#define CRYPTOPP_PCH_H
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_PRECOMPILED_HEADERS
|
||||
#include "simple.h"
|
||||
#include "secblock.h"
|
||||
#include "misc.h"
|
||||
#include "smartptr.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_PCH_H
|
||||
#define CRYPTOPP_PCH_H
|
||||
|
||||
#ifdef CRYPTOPP_GENERATE_X64_MASM
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_PRECOMPILED_HEADERS
|
||||
#include "simple.h"
|
||||
#include "secblock.h"
|
||||
#include "misc.h"
|
||||
#include "smartptr.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,63 +1,63 @@
|
||||
#ifndef CRYPTOPP_SHA_H
|
||||
#define CRYPTOPP_SHA_H
|
||||
|
||||
#include "iterhash.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// <a href="http://www.weidai.com/scan-mirror/md.html#SHA-1">SHA-1</a>
|
||||
class CRYPTOPP_DLL SHA1 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 20, SHA1>
|
||||
{
|
||||
public:
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data);
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-1";}
|
||||
};
|
||||
|
||||
typedef SHA1 SHA; // for backwards compatibility
|
||||
|
||||
//! implements the SHA-256 standard
|
||||
class CRYPTOPP_DLL SHA256 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SHA256, 32, true>
|
||||
{
|
||||
public:
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
|
||||
size_t HashMultipleBlocks(const word32 *input, size_t length);
|
||||
#endif
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data);
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-256";}
|
||||
};
|
||||
|
||||
//! implements the SHA-224 standard
|
||||
class CRYPTOPP_DLL SHA224 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SHA224, 28, true>
|
||||
{
|
||||
public:
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
|
||||
size_t HashMultipleBlocks(const word32 *input, size_t length);
|
||||
#endif
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data) {SHA256::Transform(digest, data);}
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-224";}
|
||||
};
|
||||
|
||||
//! implements the SHA-512 standard
|
||||
class CRYPTOPP_DLL SHA512 : public IteratedHashWithStaticTransform<word64, BigEndian, 128, 64, SHA512, 64, CRYPTOPP_BOOL_X86>
|
||||
{
|
||||
public:
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word64 *digest, const word64 *data);
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-512";}
|
||||
};
|
||||
|
||||
//! implements the SHA-384 standard
|
||||
class CRYPTOPP_DLL SHA384 : public IteratedHashWithStaticTransform<word64, BigEndian, 128, 64, SHA384, 48, CRYPTOPP_BOOL_X86>
|
||||
{
|
||||
public:
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word64 *digest, const word64 *data) {SHA512::Transform(digest, data);}
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-384";}
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_SHA_H
|
||||
#define CRYPTOPP_SHA_H
|
||||
|
||||
#include "iterhash.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// <a href="http://www.weidai.com/scan-mirror/md.html#SHA-1">SHA-1</a>
|
||||
class CRYPTOPP_DLL SHA1 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 20, SHA1>
|
||||
{
|
||||
public:
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data);
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-1";}
|
||||
};
|
||||
|
||||
typedef SHA1 SHA; // for backwards compatibility
|
||||
|
||||
//! implements the SHA-256 standard
|
||||
class CRYPTOPP_DLL SHA256 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SHA256, 32, true>
|
||||
{
|
||||
public:
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
|
||||
size_t HashMultipleBlocks(const word32 *input, size_t length);
|
||||
#endif
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data);
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-256";}
|
||||
};
|
||||
|
||||
//! implements the SHA-224 standard
|
||||
class CRYPTOPP_DLL SHA224 : public IteratedHashWithStaticTransform<word32, BigEndian, 64, 32, SHA224, 28, true>
|
||||
{
|
||||
public:
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
|
||||
size_t HashMultipleBlocks(const word32 *input, size_t length);
|
||||
#endif
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word32 *digest, const word32 *data) {SHA256::Transform(digest, data);}
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-224";}
|
||||
};
|
||||
|
||||
//! implements the SHA-512 standard
|
||||
class CRYPTOPP_DLL SHA512 : public IteratedHashWithStaticTransform<word64, BigEndian, 128, 64, SHA512, 64, CRYPTOPP_BOOL_X86>
|
||||
{
|
||||
public:
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word64 *digest, const word64 *data);
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-512";}
|
||||
};
|
||||
|
||||
//! implements the SHA-384 standard
|
||||
class CRYPTOPP_DLL SHA384 : public IteratedHashWithStaticTransform<word64, BigEndian, 128, 64, SHA384, 48, CRYPTOPP_BOOL_X86>
|
||||
{
|
||||
public:
|
||||
static void CRYPTOPP_API InitState(HashWordType *state);
|
||||
static void CRYPTOPP_API Transform(word64 *digest, const word64 *data) {SHA512::Transform(digest, data);}
|
||||
static const char * CRYPTOPP_API StaticAlgorithmName() {return "SHA-384";}
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -1 +1 @@
|
||||
|
||||
|
||||
@@ -1,223 +1,223 @@
|
||||
#ifndef CRYPTOPP_SMARTPTR_H
|
||||
#define CRYPTOPP_SMARTPTR_H
|
||||
|
||||
#include "config.h"
|
||||
#include <algorithm>
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class T> class simple_ptr
|
||||
{
|
||||
public:
|
||||
simple_ptr() : m_p(NULL) {}
|
||||
~simple_ptr() {delete m_p;}
|
||||
T *m_p;
|
||||
};
|
||||
|
||||
template <class T> class member_ptr
|
||||
{
|
||||
public:
|
||||
explicit member_ptr(T *p = NULL) : m_p(p) {}
|
||||
|
||||
~member_ptr();
|
||||
|
||||
const T& operator*() const { return *m_p; }
|
||||
T& operator*() { return *m_p; }
|
||||
|
||||
const T* operator->() const { return m_p; }
|
||||
T* operator->() { return m_p; }
|
||||
|
||||
const T* get() const { return m_p; }
|
||||
T* get() { return m_p; }
|
||||
|
||||
T* release()
|
||||
{
|
||||
T *old_p = m_p;
|
||||
m_p = 0;
|
||||
return old_p;
|
||||
}
|
||||
|
||||
void reset(T *p = 0);
|
||||
|
||||
protected:
|
||||
member_ptr(const member_ptr<T>& rhs); // copy not allowed
|
||||
void operator=(const member_ptr<T>& rhs); // assignment not allowed
|
||||
|
||||
T *m_p;
|
||||
};
|
||||
|
||||
template <class T> member_ptr<T>::~member_ptr() {delete m_p;}
|
||||
template <class T> void member_ptr<T>::reset(T *p) {delete m_p; m_p = p;}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template<class T> class value_ptr : public member_ptr<T>
|
||||
{
|
||||
public:
|
||||
value_ptr(const T &obj) : member_ptr<T>(new T(obj)) {}
|
||||
value_ptr(T *p = NULL) : member_ptr<T>(p) {}
|
||||
value_ptr(const value_ptr<T>& rhs)
|
||||
: member_ptr<T>(rhs.m_p ? new T(*rhs.m_p) : NULL) {}
|
||||
|
||||
value_ptr<T>& operator=(const value_ptr<T>& rhs);
|
||||
bool operator==(const value_ptr<T>& rhs)
|
||||
{
|
||||
return (!this->m_p && !rhs.m_p) || (this->m_p && rhs.m_p && *this->m_p == *rhs.m_p);
|
||||
}
|
||||
};
|
||||
|
||||
template <class T> value_ptr<T>& value_ptr<T>::operator=(const value_ptr<T>& rhs)
|
||||
{
|
||||
T *old_p = this->m_p;
|
||||
this->m_p = rhs.m_p ? new T(*rhs.m_p) : NULL;
|
||||
delete old_p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template<class T> class clonable_ptr : public member_ptr<T>
|
||||
{
|
||||
public:
|
||||
clonable_ptr(const T &obj) : member_ptr<T>(obj.Clone()) {}
|
||||
clonable_ptr(T *p = NULL) : member_ptr<T>(p) {}
|
||||
clonable_ptr(const clonable_ptr<T>& rhs)
|
||||
: member_ptr<T>(rhs.m_p ? rhs.m_p->Clone() : NULL) {}
|
||||
|
||||
clonable_ptr<T>& operator=(const clonable_ptr<T>& rhs);
|
||||
};
|
||||
|
||||
template <class T> clonable_ptr<T>& clonable_ptr<T>::operator=(const clonable_ptr<T>& rhs)
|
||||
{
|
||||
T *old_p = this->m_p;
|
||||
this->m_p = rhs.m_p ? rhs.m_p->Clone() : NULL;
|
||||
delete old_p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template<class T> class counted_ptr
|
||||
{
|
||||
public:
|
||||
explicit counted_ptr(T *p = 0);
|
||||
counted_ptr(const T &r) : m_p(0) {attach(r);}
|
||||
counted_ptr(const counted_ptr<T>& rhs);
|
||||
|
||||
~counted_ptr();
|
||||
|
||||
const T& operator*() const { return *m_p; }
|
||||
T& operator*() { return *m_p; }
|
||||
|
||||
const T* operator->() const { return m_p; }
|
||||
T* operator->() { return get(); }
|
||||
|
||||
const T* get() const { return m_p; }
|
||||
T* get();
|
||||
|
||||
void attach(const T &p);
|
||||
|
||||
counted_ptr<T> & operator=(const counted_ptr<T>& rhs);
|
||||
|
||||
private:
|
||||
T *m_p;
|
||||
};
|
||||
|
||||
template <class T> counted_ptr<T>::counted_ptr(T *p)
|
||||
: m_p(p)
|
||||
{
|
||||
if (m_p)
|
||||
m_p->m_referenceCount = 1;
|
||||
}
|
||||
|
||||
template <class T> counted_ptr<T>::counted_ptr(const counted_ptr<T>& rhs)
|
||||
: m_p(rhs.m_p)
|
||||
{
|
||||
if (m_p)
|
||||
m_p->m_referenceCount++;
|
||||
}
|
||||
|
||||
template <class T> counted_ptr<T>::~counted_ptr()
|
||||
{
|
||||
if (m_p && --m_p->m_referenceCount == 0)
|
||||
delete m_p;
|
||||
}
|
||||
|
||||
template <class T> void counted_ptr<T>::attach(const T &r)
|
||||
{
|
||||
if (m_p && --m_p->m_referenceCount == 0)
|
||||
delete m_p;
|
||||
if (r.m_referenceCount == 0)
|
||||
{
|
||||
m_p = r.clone();
|
||||
m_p->m_referenceCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_p = const_cast<T *>(&r);
|
||||
m_p->m_referenceCount++;
|
||||
}
|
||||
}
|
||||
|
||||
template <class T> T* counted_ptr<T>::get()
|
||||
{
|
||||
if (m_p && m_p->m_referenceCount > 1)
|
||||
{
|
||||
T *temp = m_p->clone();
|
||||
m_p->m_referenceCount--;
|
||||
m_p = temp;
|
||||
m_p->m_referenceCount = 1;
|
||||
}
|
||||
return m_p;
|
||||
}
|
||||
|
||||
template <class T> counted_ptr<T> & counted_ptr<T>::operator=(const counted_ptr<T>& rhs)
|
||||
{
|
||||
if (m_p != rhs.m_p)
|
||||
{
|
||||
if (m_p && --m_p->m_referenceCount == 0)
|
||||
delete m_p;
|
||||
m_p = rhs.m_p;
|
||||
if (m_p)
|
||||
m_p->m_referenceCount++;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template <class T> class vector_member_ptrs
|
||||
{
|
||||
public:
|
||||
vector_member_ptrs(size_t size=0)
|
||||
: m_size(size), m_ptr(new member_ptr<T>[size]) {}
|
||||
~vector_member_ptrs()
|
||||
{delete [] this->m_ptr;}
|
||||
|
||||
member_ptr<T>& operator[](size_t index)
|
||||
{assert(index<this->m_size); return this->m_ptr[index];}
|
||||
const member_ptr<T>& operator[](size_t index) const
|
||||
{assert(index<this->m_size); return this->m_ptr[index];}
|
||||
|
||||
size_t size() const {return this->m_size;}
|
||||
void resize(size_t newSize)
|
||||
{
|
||||
member_ptr<T> *newPtr = new member_ptr<T>[newSize];
|
||||
for (size_t i=0; i<this->m_size && i<newSize; i++)
|
||||
newPtr[i].reset(this->m_ptr[i].release());
|
||||
delete [] this->m_ptr;
|
||||
this->m_size = newSize;
|
||||
this->m_ptr = newPtr;
|
||||
}
|
||||
|
||||
private:
|
||||
vector_member_ptrs(const vector_member_ptrs<T> &c); // copy not allowed
|
||||
void operator=(const vector_member_ptrs<T> &x); // assignment not allowed
|
||||
|
||||
size_t m_size;
|
||||
member_ptr<T> *m_ptr;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_SMARTPTR_H
|
||||
#define CRYPTOPP_SMARTPTR_H
|
||||
|
||||
#include "config.h"
|
||||
#include <algorithm>
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
template <class T> class simple_ptr
|
||||
{
|
||||
public:
|
||||
simple_ptr() : m_p(NULL) {}
|
||||
~simple_ptr() {delete m_p;}
|
||||
T *m_p;
|
||||
};
|
||||
|
||||
template <class T> class member_ptr
|
||||
{
|
||||
public:
|
||||
explicit member_ptr(T *p = NULL) : m_p(p) {}
|
||||
|
||||
~member_ptr();
|
||||
|
||||
const T& operator*() const { return *m_p; }
|
||||
T& operator*() { return *m_p; }
|
||||
|
||||
const T* operator->() const { return m_p; }
|
||||
T* operator->() { return m_p; }
|
||||
|
||||
const T* get() const { return m_p; }
|
||||
T* get() { return m_p; }
|
||||
|
||||
T* release()
|
||||
{
|
||||
T *old_p = m_p;
|
||||
m_p = 0;
|
||||
return old_p;
|
||||
}
|
||||
|
||||
void reset(T *p = 0);
|
||||
|
||||
protected:
|
||||
member_ptr(const member_ptr<T>& rhs); // copy not allowed
|
||||
void operator=(const member_ptr<T>& rhs); // assignment not allowed
|
||||
|
||||
T *m_p;
|
||||
};
|
||||
|
||||
template <class T> member_ptr<T>::~member_ptr() {delete m_p;}
|
||||
template <class T> void member_ptr<T>::reset(T *p) {delete m_p; m_p = p;}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template<class T> class value_ptr : public member_ptr<T>
|
||||
{
|
||||
public:
|
||||
value_ptr(const T &obj) : member_ptr<T>(new T(obj)) {}
|
||||
value_ptr(T *p = NULL) : member_ptr<T>(p) {}
|
||||
value_ptr(const value_ptr<T>& rhs)
|
||||
: member_ptr<T>(rhs.m_p ? new T(*rhs.m_p) : NULL) {}
|
||||
|
||||
value_ptr<T>& operator=(const value_ptr<T>& rhs);
|
||||
bool operator==(const value_ptr<T>& rhs)
|
||||
{
|
||||
return (!this->m_p && !rhs.m_p) || (this->m_p && rhs.m_p && *this->m_p == *rhs.m_p);
|
||||
}
|
||||
};
|
||||
|
||||
template <class T> value_ptr<T>& value_ptr<T>::operator=(const value_ptr<T>& rhs)
|
||||
{
|
||||
T *old_p = this->m_p;
|
||||
this->m_p = rhs.m_p ? new T(*rhs.m_p) : NULL;
|
||||
delete old_p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template<class T> class clonable_ptr : public member_ptr<T>
|
||||
{
|
||||
public:
|
||||
clonable_ptr(const T &obj) : member_ptr<T>(obj.Clone()) {}
|
||||
clonable_ptr(T *p = NULL) : member_ptr<T>(p) {}
|
||||
clonable_ptr(const clonable_ptr<T>& rhs)
|
||||
: member_ptr<T>(rhs.m_p ? rhs.m_p->Clone() : NULL) {}
|
||||
|
||||
clonable_ptr<T>& operator=(const clonable_ptr<T>& rhs);
|
||||
};
|
||||
|
||||
template <class T> clonable_ptr<T>& clonable_ptr<T>::operator=(const clonable_ptr<T>& rhs)
|
||||
{
|
||||
T *old_p = this->m_p;
|
||||
this->m_p = rhs.m_p ? rhs.m_p->Clone() : NULL;
|
||||
delete old_p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template<class T> class counted_ptr
|
||||
{
|
||||
public:
|
||||
explicit counted_ptr(T *p = 0);
|
||||
counted_ptr(const T &r) : m_p(0) {attach(r);}
|
||||
counted_ptr(const counted_ptr<T>& rhs);
|
||||
|
||||
~counted_ptr();
|
||||
|
||||
const T& operator*() const { return *m_p; }
|
||||
T& operator*() { return *m_p; }
|
||||
|
||||
const T* operator->() const { return m_p; }
|
||||
T* operator->() { return get(); }
|
||||
|
||||
const T* get() const { return m_p; }
|
||||
T* get();
|
||||
|
||||
void attach(const T &p);
|
||||
|
||||
counted_ptr<T> & operator=(const counted_ptr<T>& rhs);
|
||||
|
||||
private:
|
||||
T *m_p;
|
||||
};
|
||||
|
||||
template <class T> counted_ptr<T>::counted_ptr(T *p)
|
||||
: m_p(p)
|
||||
{
|
||||
if (m_p)
|
||||
m_p->m_referenceCount = 1;
|
||||
}
|
||||
|
||||
template <class T> counted_ptr<T>::counted_ptr(const counted_ptr<T>& rhs)
|
||||
: m_p(rhs.m_p)
|
||||
{
|
||||
if (m_p)
|
||||
m_p->m_referenceCount++;
|
||||
}
|
||||
|
||||
template <class T> counted_ptr<T>::~counted_ptr()
|
||||
{
|
||||
if (m_p && --m_p->m_referenceCount == 0)
|
||||
delete m_p;
|
||||
}
|
||||
|
||||
template <class T> void counted_ptr<T>::attach(const T &r)
|
||||
{
|
||||
if (m_p && --m_p->m_referenceCount == 0)
|
||||
delete m_p;
|
||||
if (r.m_referenceCount == 0)
|
||||
{
|
||||
m_p = r.clone();
|
||||
m_p->m_referenceCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_p = const_cast<T *>(&r);
|
||||
m_p->m_referenceCount++;
|
||||
}
|
||||
}
|
||||
|
||||
template <class T> T* counted_ptr<T>::get()
|
||||
{
|
||||
if (m_p && m_p->m_referenceCount > 1)
|
||||
{
|
||||
T *temp = m_p->clone();
|
||||
m_p->m_referenceCount--;
|
||||
m_p = temp;
|
||||
m_p->m_referenceCount = 1;
|
||||
}
|
||||
return m_p;
|
||||
}
|
||||
|
||||
template <class T> counted_ptr<T> & counted_ptr<T>::operator=(const counted_ptr<T>& rhs)
|
||||
{
|
||||
if (m_p != rhs.m_p)
|
||||
{
|
||||
if (m_p && --m_p->m_referenceCount == 0)
|
||||
delete m_p;
|
||||
m_p = rhs.m_p;
|
||||
if (m_p)
|
||||
m_p->m_referenceCount++;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template <class T> class vector_member_ptrs
|
||||
{
|
||||
public:
|
||||
vector_member_ptrs(size_t size=0)
|
||||
: m_size(size), m_ptr(new member_ptr<T>[size]) {}
|
||||
~vector_member_ptrs()
|
||||
{delete [] this->m_ptr;}
|
||||
|
||||
member_ptr<T>& operator[](size_t index)
|
||||
{assert(index<this->m_size); return this->m_ptr[index];}
|
||||
const member_ptr<T>& operator[](size_t index) const
|
||||
{assert(index<this->m_size); return this->m_ptr[index];}
|
||||
|
||||
size_t size() const {return this->m_size;}
|
||||
void resize(size_t newSize)
|
||||
{
|
||||
member_ptr<T> *newPtr = new member_ptr<T>[newSize];
|
||||
for (size_t i=0; i<this->m_size && i<newSize; i++)
|
||||
newPtr[i].reset(this->m_ptr[i].release());
|
||||
delete [] this->m_ptr;
|
||||
this->m_size = newSize;
|
||||
this->m_ptr = newPtr;
|
||||
}
|
||||
|
||||
private:
|
||||
vector_member_ptrs(const vector_member_ptrs<T> &c); // copy not allowed
|
||||
void operator=(const vector_member_ptrs<T> &x); // assignment not allowed
|
||||
|
||||
size_t m_size;
|
||||
member_ptr<T> *m_ptr;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@@ -1,27 +1,27 @@
|
||||
#ifndef CRYPTOPP_STDCPP_H
|
||||
#define CRYPTOPP_STDCPP_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <string.h> // CodeWarrior doesn't have memory.h
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
// re-disable this
|
||||
#pragma warning(disable: 4231)
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_CRTAPI1)
|
||||
#define CRYPTOPP_MSVCRT6
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef CRYPTOPP_STDCPP_H
|
||||
#define CRYPTOPP_STDCPP_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <string.h> // CodeWarrior doesn't have memory.h
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
// re-disable this
|
||||
#pragma warning(disable: 4231)
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_CRTAPI1)
|
||||
#define CRYPTOPP_MSVCRT6
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1715
db.cpp → src/db.cpp
862
db.h → src/db.h
@@ -1,406 +1,456 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
class CTransaction;
|
||||
class CTxIndex;
|
||||
class CDiskBlockIndex;
|
||||
class CDiskTxPos;
|
||||
class COutPoint;
|
||||
class CUser;
|
||||
class CReview;
|
||||
class CAddress;
|
||||
class CWalletTx;
|
||||
|
||||
extern map<string, string> mapAddressBook;
|
||||
extern CCriticalSection cs_mapAddressBook;
|
||||
extern vector<unsigned char> vchDefaultKey;
|
||||
extern bool fClient;
|
||||
extern int nBestHeight;
|
||||
|
||||
|
||||
extern unsigned int nWalletDBUpdated;
|
||||
extern DbEnv dbenv;
|
||||
|
||||
|
||||
extern void DBFlush(bool fShutdown);
|
||||
|
||||
|
||||
|
||||
|
||||
class CDB
|
||||
{
|
||||
protected:
|
||||
Db* pdb;
|
||||
string strFile;
|
||||
vector<DbTxn*> vTxn;
|
||||
bool fReadOnly;
|
||||
|
||||
explicit CDB(const char* pszFile, const char* pszMode="r+");
|
||||
~CDB() { Close(); }
|
||||
public:
|
||||
void Close();
|
||||
private:
|
||||
CDB(const CDB&);
|
||||
void operator=(const CDB&);
|
||||
|
||||
protected:
|
||||
template<typename K, typename T>
|
||||
bool Read(const K& key, T& value)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Read
|
||||
Dbt datValue;
|
||||
datValue.set_flags(DB_DBT_MALLOC);
|
||||
int ret = pdb->get(GetTxn(), &datKey, &datValue, 0);
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
if (datValue.get_data() == NULL)
|
||||
return false;
|
||||
|
||||
// Unserialize value
|
||||
CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK);
|
||||
ssValue >> value;
|
||||
|
||||
// Clear and free memory
|
||||
memset(datValue.get_data(), 0, datValue.get_size());
|
||||
free(datValue.get_data());
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
template<typename K, typename T>
|
||||
bool Write(const K& key, const T& value, bool fOverwrite=true)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (fReadOnly)
|
||||
assert(("Write called on database in read-only mode", false));
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Value
|
||||
CDataStream ssValue(SER_DISK);
|
||||
ssValue.reserve(10000);
|
||||
ssValue << value;
|
||||
Dbt datValue(&ssValue[0], ssValue.size());
|
||||
|
||||
// Write
|
||||
int ret = pdb->put(GetTxn(), &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE));
|
||||
|
||||
// Clear memory in case it was a private key
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
memset(datValue.get_data(), 0, datValue.get_size());
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
template<typename K>
|
||||
bool Erase(const K& key)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (fReadOnly)
|
||||
assert(("Erase called on database in read-only mode", false));
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Erase
|
||||
int ret = pdb->del(GetTxn(), &datKey, 0);
|
||||
|
||||
// Clear memory
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
return (ret == 0 || ret == DB_NOTFOUND);
|
||||
}
|
||||
|
||||
template<typename K>
|
||||
bool Exists(const K& key)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Exists
|
||||
int ret = pdb->exists(GetTxn(), &datKey, 0);
|
||||
|
||||
// Clear memory
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
Dbc* GetCursor()
|
||||
{
|
||||
if (!pdb)
|
||||
return NULL;
|
||||
Dbc* pcursor = NULL;
|
||||
int ret = pdb->cursor(NULL, &pcursor, 0);
|
||||
if (ret != 0)
|
||||
return NULL;
|
||||
return pcursor;
|
||||
}
|
||||
|
||||
int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, unsigned int fFlags=DB_NEXT)
|
||||
{
|
||||
// Read at cursor
|
||||
Dbt datKey;
|
||||
if (fFlags == DB_SET || fFlags == DB_SET_RANGE || fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE)
|
||||
{
|
||||
datKey.set_data(&ssKey[0]);
|
||||
datKey.set_size(ssKey.size());
|
||||
}
|
||||
Dbt datValue;
|
||||
if (fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE)
|
||||
{
|
||||
datValue.set_data(&ssValue[0]);
|
||||
datValue.set_size(ssValue.size());
|
||||
}
|
||||
datKey.set_flags(DB_DBT_MALLOC);
|
||||
datValue.set_flags(DB_DBT_MALLOC);
|
||||
int ret = pcursor->get(&datKey, &datValue, fFlags);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
else if (datKey.get_data() == NULL || datValue.get_data() == NULL)
|
||||
return 99999;
|
||||
|
||||
// Convert to streams
|
||||
ssKey.SetType(SER_DISK);
|
||||
ssKey.clear();
|
||||
ssKey.write((char*)datKey.get_data(), datKey.get_size());
|
||||
ssValue.SetType(SER_DISK);
|
||||
ssValue.clear();
|
||||
ssValue.write((char*)datValue.get_data(), datValue.get_size());
|
||||
|
||||
// Clear and free memory
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
memset(datValue.get_data(), 0, datValue.get_size());
|
||||
free(datKey.get_data());
|
||||
free(datValue.get_data());
|
||||
return 0;
|
||||
}
|
||||
|
||||
DbTxn* GetTxn()
|
||||
{
|
||||
if (!vTxn.empty())
|
||||
return vTxn.back();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
bool TxnBegin()
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
DbTxn* ptxn = NULL;
|
||||
int ret = dbenv.txn_begin(GetTxn(), &ptxn, DB_TXN_NOSYNC);
|
||||
if (!ptxn || ret != 0)
|
||||
return false;
|
||||
vTxn.push_back(ptxn);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TxnCommit()
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (vTxn.empty())
|
||||
return false;
|
||||
int ret = vTxn.back()->commit(0);
|
||||
vTxn.pop_back();
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
bool TxnAbort()
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (vTxn.empty())
|
||||
return false;
|
||||
int ret = vTxn.back()->abort();
|
||||
vTxn.pop_back();
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
bool ReadVersion(int& nVersion)
|
||||
{
|
||||
nVersion = 0;
|
||||
return Read(string("version"), nVersion);
|
||||
}
|
||||
|
||||
bool WriteVersion(int nVersion)
|
||||
{
|
||||
return Write(string("version"), nVersion);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CTxDB : public CDB
|
||||
{
|
||||
public:
|
||||
CTxDB(const char* pszMode="r+") : CDB(!fClient ? "blkindex.dat" : NULL, pszMode) { }
|
||||
private:
|
||||
CTxDB(const CTxDB&);
|
||||
void operator=(const CTxDB&);
|
||||
public:
|
||||
bool ReadTxIndex(uint256 hash, CTxIndex& txindex);
|
||||
bool UpdateTxIndex(uint256 hash, const CTxIndex& txindex);
|
||||
bool AddTxIndex(const CTransaction& tx, const CDiskTxPos& pos, int nHeight);
|
||||
bool EraseTxIndex(const CTransaction& tx);
|
||||
bool ContainsTx(uint256 hash);
|
||||
bool ReadOwnerTxes(uint160 hash160, int nHeight, vector<CTransaction>& vtx);
|
||||
bool ReadDiskTx(uint256 hash, CTransaction& tx, CTxIndex& txindex);
|
||||
bool ReadDiskTx(uint256 hash, CTransaction& tx);
|
||||
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex);
|
||||
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx);
|
||||
bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
|
||||
bool EraseBlockIndex(uint256 hash);
|
||||
bool ReadHashBestChain(uint256& hashBestChain);
|
||||
bool WriteHashBestChain(uint256 hashBestChain);
|
||||
bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork);
|
||||
bool WriteBestInvalidWork(CBigNum bnBestInvalidWork);
|
||||
bool LoadBlockIndex();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CAddrDB : public CDB
|
||||
{
|
||||
public:
|
||||
CAddrDB(const char* pszMode="r+") : CDB("addr.dat", pszMode) { }
|
||||
private:
|
||||
CAddrDB(const CAddrDB&);
|
||||
void operator=(const CAddrDB&);
|
||||
public:
|
||||
bool WriteAddress(const CAddress& addr);
|
||||
bool LoadAddresses();
|
||||
};
|
||||
|
||||
bool LoadAddresses();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CWalletDB : public CDB
|
||||
{
|
||||
public:
|
||||
CWalletDB(const char* pszMode="r+") : CDB("wallet.dat", pszMode) { }
|
||||
private:
|
||||
CWalletDB(const CWalletDB&);
|
||||
void operator=(const CWalletDB&);
|
||||
public:
|
||||
bool ReadName(const string& strAddress, string& strName)
|
||||
{
|
||||
strName = "";
|
||||
return Read(make_pair(string("name"), strAddress), strName);
|
||||
}
|
||||
|
||||
bool WriteName(const string& strAddress, const string& strName)
|
||||
{
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
mapAddressBook[strAddress] = strName;
|
||||
nWalletDBUpdated++;
|
||||
return Write(make_pair(string("name"), strAddress), strName);
|
||||
}
|
||||
|
||||
bool EraseName(const string& strAddress)
|
||||
{
|
||||
// This should only be used for sending addresses, never for receiving addresses,
|
||||
// receiving addresses must always have an address book entry if they're not change return.
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
mapAddressBook.erase(strAddress);
|
||||
nWalletDBUpdated++;
|
||||
return Erase(make_pair(string("name"), strAddress));
|
||||
}
|
||||
|
||||
bool ReadTx(uint256 hash, CWalletTx& wtx)
|
||||
{
|
||||
return Read(make_pair(string("tx"), hash), wtx);
|
||||
}
|
||||
|
||||
bool WriteTx(uint256 hash, const CWalletTx& wtx)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(make_pair(string("tx"), hash), wtx);
|
||||
}
|
||||
|
||||
bool EraseTx(uint256 hash)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Erase(make_pair(string("tx"), hash));
|
||||
}
|
||||
|
||||
bool ReadKey(const vector<unsigned char>& vchPubKey, CPrivKey& vchPrivKey)
|
||||
{
|
||||
vchPrivKey.clear();
|
||||
return Read(make_pair(string("key"), vchPubKey), vchPrivKey);
|
||||
}
|
||||
|
||||
bool WriteKey(const vector<unsigned char>& vchPubKey, const CPrivKey& vchPrivKey)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(make_pair(string("key"), vchPubKey), vchPrivKey, false);
|
||||
}
|
||||
|
||||
bool ReadDefaultKey(vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
vchPubKey.clear();
|
||||
return Read(string("defaultkey"), vchPubKey);
|
||||
}
|
||||
|
||||
bool WriteDefaultKey(const vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
vchDefaultKey = vchPubKey;
|
||||
nWalletDBUpdated++;
|
||||
return Write(string("defaultkey"), vchPubKey);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool ReadSetting(const string& strKey, T& value)
|
||||
{
|
||||
return Read(make_pair(string("setting"), strKey), value);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool WriteSetting(const string& strKey, const T& value)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(make_pair(string("setting"), strKey), value);
|
||||
}
|
||||
|
||||
bool LoadWallet();
|
||||
};
|
||||
|
||||
bool LoadWallet(bool& fFirstRunRet);
|
||||
|
||||
inline bool SetAddressBookName(const string& strAddress, const string& strName)
|
||||
{
|
||||
return CWalletDB().WriteName(strAddress, strName);
|
||||
}
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
#ifndef BITCOIN_DB_H
|
||||
#define BITCOIN_DB_H
|
||||
|
||||
#include "key.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <db_cxx.h>
|
||||
|
||||
class CTxIndex;
|
||||
class CDiskBlockIndex;
|
||||
class CDiskTxPos;
|
||||
class COutPoint;
|
||||
class CAddress;
|
||||
class CWalletTx;
|
||||
class CWallet;
|
||||
class CAccount;
|
||||
class CAccountingEntry;
|
||||
class CBlockLocator;
|
||||
|
||||
|
||||
extern unsigned int nWalletDBUpdated;
|
||||
extern DbEnv dbenv;
|
||||
|
||||
|
||||
extern void DBFlush(bool fShutdown);
|
||||
void ThreadFlushWalletDB(void* parg);
|
||||
bool BackupWallet(const CWallet& wallet, const std::string& strDest);
|
||||
|
||||
|
||||
|
||||
|
||||
class CDB
|
||||
{
|
||||
protected:
|
||||
Db* pdb;
|
||||
std::string strFile;
|
||||
std::vector<DbTxn*> vTxn;
|
||||
bool fReadOnly;
|
||||
|
||||
explicit CDB(const char* pszFile, const char* pszMode="r+");
|
||||
~CDB() { Close(); }
|
||||
public:
|
||||
void Close();
|
||||
private:
|
||||
CDB(const CDB&);
|
||||
void operator=(const CDB&);
|
||||
|
||||
protected:
|
||||
template<typename K, typename T>
|
||||
bool Read(const K& key, T& value)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Read
|
||||
Dbt datValue;
|
||||
datValue.set_flags(DB_DBT_MALLOC);
|
||||
int ret = pdb->get(GetTxn(), &datKey, &datValue, 0);
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
if (datValue.get_data() == NULL)
|
||||
return false;
|
||||
|
||||
// Unserialize value
|
||||
CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK);
|
||||
ssValue >> value;
|
||||
|
||||
// Clear and free memory
|
||||
memset(datValue.get_data(), 0, datValue.get_size());
|
||||
free(datValue.get_data());
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
template<typename K, typename T>
|
||||
bool Write(const K& key, const T& value, bool fOverwrite=true)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (fReadOnly)
|
||||
assert(("Write called on database in read-only mode", false));
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Value
|
||||
CDataStream ssValue(SER_DISK);
|
||||
ssValue.reserve(10000);
|
||||
ssValue << value;
|
||||
Dbt datValue(&ssValue[0], ssValue.size());
|
||||
|
||||
// Write
|
||||
int ret = pdb->put(GetTxn(), &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE));
|
||||
|
||||
// Clear memory in case it was a private key
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
memset(datValue.get_data(), 0, datValue.get_size());
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
template<typename K>
|
||||
bool Erase(const K& key)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (fReadOnly)
|
||||
assert(("Erase called on database in read-only mode", false));
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Erase
|
||||
int ret = pdb->del(GetTxn(), &datKey, 0);
|
||||
|
||||
// Clear memory
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
return (ret == 0 || ret == DB_NOTFOUND);
|
||||
}
|
||||
|
||||
template<typename K>
|
||||
bool Exists(const K& key)
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
|
||||
// Key
|
||||
CDataStream ssKey(SER_DISK);
|
||||
ssKey.reserve(1000);
|
||||
ssKey << key;
|
||||
Dbt datKey(&ssKey[0], ssKey.size());
|
||||
|
||||
// Exists
|
||||
int ret = pdb->exists(GetTxn(), &datKey, 0);
|
||||
|
||||
// Clear memory
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
Dbc* GetCursor()
|
||||
{
|
||||
if (!pdb)
|
||||
return NULL;
|
||||
Dbc* pcursor = NULL;
|
||||
int ret = pdb->cursor(NULL, &pcursor, 0);
|
||||
if (ret != 0)
|
||||
return NULL;
|
||||
return pcursor;
|
||||
}
|
||||
|
||||
int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, unsigned int fFlags=DB_NEXT)
|
||||
{
|
||||
// Read at cursor
|
||||
Dbt datKey;
|
||||
if (fFlags == DB_SET || fFlags == DB_SET_RANGE || fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE)
|
||||
{
|
||||
datKey.set_data(&ssKey[0]);
|
||||
datKey.set_size(ssKey.size());
|
||||
}
|
||||
Dbt datValue;
|
||||
if (fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE)
|
||||
{
|
||||
datValue.set_data(&ssValue[0]);
|
||||
datValue.set_size(ssValue.size());
|
||||
}
|
||||
datKey.set_flags(DB_DBT_MALLOC);
|
||||
datValue.set_flags(DB_DBT_MALLOC);
|
||||
int ret = pcursor->get(&datKey, &datValue, fFlags);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
else if (datKey.get_data() == NULL || datValue.get_data() == NULL)
|
||||
return 99999;
|
||||
|
||||
// Convert to streams
|
||||
ssKey.SetType(SER_DISK);
|
||||
ssKey.clear();
|
||||
ssKey.write((char*)datKey.get_data(), datKey.get_size());
|
||||
ssValue.SetType(SER_DISK);
|
||||
ssValue.clear();
|
||||
ssValue.write((char*)datValue.get_data(), datValue.get_size());
|
||||
|
||||
// Clear and free memory
|
||||
memset(datKey.get_data(), 0, datKey.get_size());
|
||||
memset(datValue.get_data(), 0, datValue.get_size());
|
||||
free(datKey.get_data());
|
||||
free(datValue.get_data());
|
||||
return 0;
|
||||
}
|
||||
|
||||
DbTxn* GetTxn()
|
||||
{
|
||||
if (!vTxn.empty())
|
||||
return vTxn.back();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
bool TxnBegin()
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
DbTxn* ptxn = NULL;
|
||||
int ret = dbenv.txn_begin(GetTxn(), &ptxn, DB_TXN_NOSYNC);
|
||||
if (!ptxn || ret != 0)
|
||||
return false;
|
||||
vTxn.push_back(ptxn);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TxnCommit()
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (vTxn.empty())
|
||||
return false;
|
||||
int ret = vTxn.back()->commit(0);
|
||||
vTxn.pop_back();
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
bool TxnAbort()
|
||||
{
|
||||
if (!pdb)
|
||||
return false;
|
||||
if (vTxn.empty())
|
||||
return false;
|
||||
int ret = vTxn.back()->abort();
|
||||
vTxn.pop_back();
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
bool ReadVersion(int& nVersion)
|
||||
{
|
||||
nVersion = 0;
|
||||
return Read(std::string("version"), nVersion);
|
||||
}
|
||||
|
||||
bool WriteVersion(int nVersion)
|
||||
{
|
||||
return Write(std::string("version"), nVersion);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CTxDB : public CDB
|
||||
{
|
||||
public:
|
||||
CTxDB(const char* pszMode="r+") : CDB("blkindex.dat", pszMode) { }
|
||||
private:
|
||||
CTxDB(const CTxDB&);
|
||||
void operator=(const CTxDB&);
|
||||
public:
|
||||
bool ReadTxIndex(uint256 hash, CTxIndex& txindex);
|
||||
bool UpdateTxIndex(uint256 hash, const CTxIndex& txindex);
|
||||
bool AddTxIndex(const CTransaction& tx, const CDiskTxPos& pos, int nHeight);
|
||||
bool EraseTxIndex(const CTransaction& tx);
|
||||
bool ContainsTx(uint256 hash);
|
||||
bool ReadOwnerTxes(uint160 hash160, int nHeight, std::vector<CTransaction>& vtx);
|
||||
bool ReadDiskTx(uint256 hash, CTransaction& tx, CTxIndex& txindex);
|
||||
bool ReadDiskTx(uint256 hash, CTransaction& tx);
|
||||
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex);
|
||||
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx);
|
||||
bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
|
||||
bool EraseBlockIndex(uint256 hash);
|
||||
bool ReadHashBestChain(uint256& hashBestChain);
|
||||
bool WriteHashBestChain(uint256 hashBestChain);
|
||||
bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork);
|
||||
bool WriteBestInvalidWork(CBigNum bnBestInvalidWork);
|
||||
bool LoadBlockIndex();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CAddrDB : public CDB
|
||||
{
|
||||
public:
|
||||
CAddrDB(const char* pszMode="r+") : CDB("addr.dat", pszMode) { }
|
||||
private:
|
||||
CAddrDB(const CAddrDB&);
|
||||
void operator=(const CAddrDB&);
|
||||
public:
|
||||
bool WriteAddress(const CAddress& addr);
|
||||
bool EraseAddress(const CAddress& addr);
|
||||
bool LoadAddresses();
|
||||
};
|
||||
|
||||
bool LoadAddresses();
|
||||
|
||||
|
||||
|
||||
class CKeyPool
|
||||
{
|
||||
public:
|
||||
int64 nTime;
|
||||
std::vector<unsigned char> vchPubKey;
|
||||
|
||||
CKeyPool()
|
||||
{
|
||||
nTime = GetTime();
|
||||
}
|
||||
|
||||
CKeyPool(const std::vector<unsigned char>& vchPubKeyIn)
|
||||
{
|
||||
nTime = GetTime();
|
||||
vchPubKey = vchPubKeyIn;
|
||||
}
|
||||
|
||||
IMPLEMENT_SERIALIZE
|
||||
(
|
||||
if (!(nType & SER_GETHASH))
|
||||
READWRITE(nVersion);
|
||||
READWRITE(nTime);
|
||||
READWRITE(vchPubKey);
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class CWalletDB : public CDB
|
||||
{
|
||||
public:
|
||||
CWalletDB(std::string strFilename, const char* pszMode="r+") : CDB(strFilename.c_str(), pszMode)
|
||||
{
|
||||
}
|
||||
private:
|
||||
CWalletDB(const CWalletDB&);
|
||||
void operator=(const CWalletDB&);
|
||||
public:
|
||||
bool ReadName(const std::string& strAddress, std::string& strName)
|
||||
{
|
||||
strName = "";
|
||||
return Read(std::make_pair(std::string("name"), strAddress), strName);
|
||||
}
|
||||
|
||||
bool WriteName(const std::string& strAddress, const std::string& strName);
|
||||
|
||||
bool EraseName(const std::string& strAddress);
|
||||
|
||||
bool ReadTx(uint256 hash, CWalletTx& wtx)
|
||||
{
|
||||
return Read(std::make_pair(std::string("tx"), hash), wtx);
|
||||
}
|
||||
|
||||
bool WriteTx(uint256 hash, const CWalletTx& wtx)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(std::make_pair(std::string("tx"), hash), wtx);
|
||||
}
|
||||
|
||||
bool EraseTx(uint256 hash)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Erase(std::make_pair(std::string("tx"), hash));
|
||||
}
|
||||
|
||||
bool ReadKey(const std::vector<unsigned char>& vchPubKey, CPrivKey& vchPrivKey)
|
||||
{
|
||||
vchPrivKey.clear();
|
||||
return Read(std::make_pair(std::string("key"), vchPubKey), vchPrivKey);
|
||||
}
|
||||
|
||||
bool WriteKey(const std::vector<unsigned char>& vchPubKey, const CPrivKey& vchPrivKey)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(std::make_pair(std::string("key"), vchPubKey), vchPrivKey, false);
|
||||
}
|
||||
|
||||
bool WriteBestBlock(const CBlockLocator& locator)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(std::string("bestblock"), locator);
|
||||
}
|
||||
|
||||
bool ReadBestBlock(CBlockLocator& locator)
|
||||
{
|
||||
return Read(std::string("bestblock"), locator);
|
||||
}
|
||||
|
||||
bool ReadDefaultKey(std::vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
vchPubKey.clear();
|
||||
return Read(std::string("defaultkey"), vchPubKey);
|
||||
}
|
||||
|
||||
bool WriteDefaultKey(const std::vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(std::string("defaultkey"), vchPubKey);
|
||||
}
|
||||
|
||||
bool ReadPool(int64 nPool, CKeyPool& keypool)
|
||||
{
|
||||
return Read(std::make_pair(std::string("pool"), nPool), keypool);
|
||||
}
|
||||
|
||||
bool WritePool(int64 nPool, const CKeyPool& keypool)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(std::make_pair(std::string("pool"), nPool), keypool);
|
||||
}
|
||||
|
||||
bool ErasePool(int64 nPool)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Erase(std::make_pair(std::string("pool"), nPool));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool ReadSetting(const std::string& strKey, T& value)
|
||||
{
|
||||
return Read(std::make_pair(std::string("setting"), strKey), value);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool WriteSetting(const std::string& strKey, const T& value)
|
||||
{
|
||||
nWalletDBUpdated++;
|
||||
return Write(std::make_pair(std::string("setting"), strKey), value);
|
||||
}
|
||||
|
||||
bool ReadAccount(const std::string& strAccount, CAccount& account);
|
||||
bool WriteAccount(const std::string& strAccount, const CAccount& account);
|
||||
bool WriteAccountingEntry(const CAccountingEntry& acentry);
|
||||
int64 GetAccountCreditDebit(const std::string& strAccount);
|
||||
void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries);
|
||||
|
||||
bool LoadWallet(CWallet* pwallet);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,144 +1,117 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4786)
|
||||
#pragma warning(disable:4804)
|
||||
#pragma warning(disable:4805)
|
||||
#pragma warning(disable:4717)
|
||||
#endif
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
#define _WIN32_IE 0x0400
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#define __STDC_LIMIT_MACROS // to enable UINT64_MAX from stdint.h
|
||||
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
#include <sys/param.h> // to get BSD define
|
||||
#endif
|
||||
#ifdef __WXMAC_OSX__
|
||||
#ifndef BSD
|
||||
#define BSD 1
|
||||
#endif
|
||||
#endif
|
||||
#ifdef GUI
|
||||
#include <wx/wx.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/snglinst.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/taskbar.h>
|
||||
#endif
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/ecdsa.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/ripemd.h>
|
||||
#include <db_cxx.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#include <assert.h>
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/tuple/tuple_comparison.hpp>
|
||||
#include <boost/tuple/tuple_io.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/interprocess/sync/interprocess_mutex.hpp>
|
||||
#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian_types.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/program_options/detail/config_file.hpp>
|
||||
#include <boost/program_options/parsers.hpp>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <mswsock.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <net/if.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef BSD
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
||||
#pragma hdrstop
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
#include "strlcpy.h"
|
||||
#include "serialize.h"
|
||||
#include "uint256.h"
|
||||
#include "util.h"
|
||||
#include "key.h"
|
||||
#include "bignum.h"
|
||||
#include "base58.h"
|
||||
#include "script.h"
|
||||
#include "db.h"
|
||||
#include "net.h"
|
||||
#include "irc.h"
|
||||
#include "main.h"
|
||||
#include "rpc.h"
|
||||
#ifdef GUI
|
||||
#include "uibase.h"
|
||||
#include "ui.h"
|
||||
#else
|
||||
#include "noui.h"
|
||||
#endif
|
||||
#include "init.h"
|
||||
|
||||
#include "xpm/addressbook16.xpm"
|
||||
#include "xpm/addressbook20.xpm"
|
||||
#include "xpm/bitcoin16.xpm"
|
||||
#include "xpm/bitcoin20.xpm"
|
||||
#include "xpm/bitcoin32.xpm"
|
||||
#include "xpm/bitcoin48.xpm"
|
||||
#include "xpm/bitcoin80.xpm"
|
||||
#include "xpm/check.xpm"
|
||||
#include "xpm/send16.xpm"
|
||||
#include "xpm/send16noshadow.xpm"
|
||||
#include "xpm/send20.xpm"
|
||||
#include "xpm/about.xpm"
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4786)
|
||||
#pragma warning(disable:4804)
|
||||
#pragma warning(disable:4805)
|
||||
#pragma warning(disable:4717)
|
||||
#endif
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
#define _WIN32_IE 0x0400
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#define __STDC_LIMIT_MACROS // to enable UINT64_MAX from stdint.h
|
||||
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
#include <sys/param.h> // to get BSD define
|
||||
#endif
|
||||
#ifdef __WXMAC_OSX__
|
||||
#ifndef BSD
|
||||
#define BSD 1
|
||||
#endif
|
||||
#endif
|
||||
#ifdef GUI
|
||||
#include <wx/wx.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/snglinst.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/taskbar.h>
|
||||
#endif
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/ecdsa.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/ripemd.h>
|
||||
#include <db_cxx.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <mswsock.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <net/if.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#ifdef BSD
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
#include "serialize.h"
|
||||
#include "uint256.h"
|
||||
#include "util.h"
|
||||
#include "bignum.h"
|
||||
#include "base58.h"
|
||||
#include "main.h"
|
||||
#ifdef GUI
|
||||
#include "uibase.h"
|
||||
#include "ui.h"
|
||||
#else
|
||||
#include "noui.h"
|
||||
#endif
|
||||
|
||||
#ifdef GUI
|
||||
#include "xpm/addressbook16.xpm"
|
||||
#include "xpm/addressbook20.xpm"
|
||||
#include "xpm/bitcoin16.xpm"
|
||||
#include "xpm/bitcoin20.xpm"
|
||||
#include "xpm/bitcoin32.xpm"
|
||||
#include "xpm/bitcoin48.xpm"
|
||||
#include "xpm/bitcoin80.xpm"
|
||||
#include "xpm/check.xpm"
|
||||
#include "xpm/send16.xpm"
|
||||
#include "xpm/send16noshadow.xpm"
|
||||
#include "xpm/send20.xpm"
|
||||
#include "xpm/about.xpm"
|
||||
#endif
|
||||
@@ -1,405 +1,554 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "headers.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Shutdown
|
||||
//
|
||||
|
||||
void ExitTimeout(void* parg)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
Sleep(5000);
|
||||
ExitProcess(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Shutdown(void* parg)
|
||||
{
|
||||
static CCriticalSection cs_Shutdown;
|
||||
static bool fTaken;
|
||||
bool fFirstThread;
|
||||
CRITICAL_BLOCK(cs_Shutdown)
|
||||
{
|
||||
fFirstThread = !fTaken;
|
||||
fTaken = true;
|
||||
}
|
||||
static bool fExit;
|
||||
if (fFirstThread)
|
||||
{
|
||||
fShutdown = true;
|
||||
nTransactionsUpdated++;
|
||||
DBFlush(false);
|
||||
StopNode();
|
||||
DBFlush(true);
|
||||
CreateThread(ExitTimeout, NULL);
|
||||
Sleep(50);
|
||||
printf("Bitcoin exiting\n\n");
|
||||
fExit = true;
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (!fExit)
|
||||
Sleep(500);
|
||||
Sleep(100);
|
||||
ExitThread(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Start
|
||||
//
|
||||
|
||||
#ifndef GUI
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
for (int i = 1; i < argc; i++)
|
||||
if (!IsSwitchChar(argv[i][0]))
|
||||
fCommandLine = true;
|
||||
fDaemon = !fCommandLine;
|
||||
|
||||
#ifdef __WXGTK__
|
||||
if (!fCommandLine)
|
||||
{
|
||||
// Daemonize
|
||||
pid_t pid = fork();
|
||||
if (pid < 0)
|
||||
{
|
||||
fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno);
|
||||
return 1;
|
||||
}
|
||||
if (pid > 0)
|
||||
pthread_exit((void*)0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!AppInit(argc, argv))
|
||||
return 1;
|
||||
|
||||
while (!fShutdown)
|
||||
Sleep(1000000);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool AppInit(int argc, char* argv[])
|
||||
{
|
||||
bool fRet = false;
|
||||
try
|
||||
{
|
||||
fRet = AppInit2(argc, argv);
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
PrintException(&e, "AppInit()");
|
||||
} catch (...) {
|
||||
PrintException(NULL, "AppInit()");
|
||||
}
|
||||
if (!fRet)
|
||||
Shutdown(NULL);
|
||||
return fRet;
|
||||
}
|
||||
|
||||
bool AppInit2(int argc, char* argv[])
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
// Turn off microsoft heap dump noise
|
||||
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
|
||||
_CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
|
||||
#endif
|
||||
#if _MSC_VER >= 1400
|
||||
// Disable confusing "helpful" text message on abort, ctrl-c
|
||||
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
|
||||
#endif
|
||||
#ifndef __WXMSW__
|
||||
umask(077);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Parameters
|
||||
//
|
||||
ParseParameters(argc, argv);
|
||||
|
||||
if (mapArgs.count("-datadir"))
|
||||
{
|
||||
filesystem::path pathDataDir = filesystem::system_complete(mapArgs["-datadir"]);
|
||||
strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir));
|
||||
}
|
||||
|
||||
ReadConfigFile(mapArgs, mapMultiArgs); // Must be done after processing datadir
|
||||
|
||||
if (mapArgs.count("-?") || mapArgs.count("--help"))
|
||||
{
|
||||
string strUsage = string() +
|
||||
_("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" +
|
||||
" bitcoin [options] \t " + "\n" +
|
||||
" bitcoin [options] <command> [params]\t " + _("Send command to -server or bitcoind\n") +
|
||||
" bitcoin [options] help \t\t " + _("List commands\n") +
|
||||
" bitcoin [options] help <command> \t\t " + _("Get help for a command\n") +
|
||||
_("Options:\n") +
|
||||
" -conf=<file> \t " + _("Specify configuration file (default: bitcoin.conf)\n") +
|
||||
" -gen \t " + _("Generate coins\n") +
|
||||
" -gen=0 \t " + _("Don't generate coins\n") +
|
||||
" -min \t " + _("Start minimized\n") +
|
||||
" -datadir=<dir> \t " + _("Specify data directory\n") +
|
||||
" -proxy=<ip:port>\t " + _("Connect through socks4 proxy\n") +
|
||||
" -addnode=<ip> \t " + _("Add a node to connect to\n") +
|
||||
" -connect=<ip> \t " + _("Connect only to the specified node\n") +
|
||||
" -server \t " + _("Accept command line and JSON-RPC commands\n") +
|
||||
" -daemon \t " + _("Run in the background as a daemon and accept commands\n") +
|
||||
" -? \t " + _("This help message\n");
|
||||
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
// Tabs make the columns line up in the message box
|
||||
wxMessageBox(strUsage, "Bitcoin", wxOK);
|
||||
#else
|
||||
// Remove tabs
|
||||
strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end());
|
||||
fprintf(stderr, "%s", strUsage.c_str());
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mapArgs.count("-debug"))
|
||||
fDebug = true;
|
||||
|
||||
if (mapArgs.count("-printtodebugger"))
|
||||
fPrintToDebugger = true;
|
||||
|
||||
if (fCommandLine)
|
||||
{
|
||||
int ret = CommandLineRPC(argc, argv);
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
if (!fDebug && !pszSetDataDir[0])
|
||||
ShrinkDebugFile();
|
||||
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||
printf("Bitcoin version %d.%d.%d%s beta\n", VERSION/10000, (VERSION/100)%100, VERSION%100, pszSubVer);
|
||||
#ifdef GUI
|
||||
printf("OS version %s\n", ((string)wxGetOsDescription()).c_str());
|
||||
printf("System default language is %d %s\n", g_locale.GetSystemLanguage(), ((string)g_locale.GetSysName()).c_str());
|
||||
printf("Language file %s (%s)\n", (string("locale/") + (string)g_locale.GetCanonicalName() + "/LC_MESSAGES/bitcoin.mo").c_str(), ((string)g_locale.GetLocale()).c_str());
|
||||
#endif
|
||||
printf("Default data directory %s\n", GetDefaultDataDir().c_str());
|
||||
|
||||
if (mapArgs.count("-loadblockindextest"))
|
||||
{
|
||||
CTxDB txdb("r");
|
||||
txdb.LoadBlockIndex();
|
||||
PrintBlockTree();
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Limit to single instance per user
|
||||
// Required to protect the database files if we're going to keep deleting log.*
|
||||
//
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
// todo: wxSingleInstanceChecker wasn't working on Linux, never deleted its lock file
|
||||
// maybe should go by whether successfully bind port 8333 instead
|
||||
wxString strMutexName = wxString("bitcoin_running.") + getenv("HOMEPATH");
|
||||
for (int i = 0; i < strMutexName.size(); i++)
|
||||
if (!isalnum(strMutexName[i]))
|
||||
strMutexName[i] = '.';
|
||||
wxSingleInstanceChecker* psingleinstancechecker = new wxSingleInstanceChecker(strMutexName);
|
||||
if (psingleinstancechecker->IsAnotherRunning())
|
||||
{
|
||||
printf("Existing instance found\n");
|
||||
unsigned int nStart = GetTime();
|
||||
loop
|
||||
{
|
||||
// TODO: find out how to do this in Linux, or replace with wxWidgets commands
|
||||
// Show the previous instance and exit
|
||||
HWND hwndPrev = FindWindowA("wxWindowClassNR", "Bitcoin");
|
||||
if (hwndPrev)
|
||||
{
|
||||
if (IsIconic(hwndPrev))
|
||||
ShowWindow(hwndPrev, SW_RESTORE);
|
||||
SetForegroundWindow(hwndPrev);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetTime() > nStart + 60)
|
||||
return false;
|
||||
|
||||
// Resume this instance if the other exits
|
||||
delete psingleinstancechecker;
|
||||
Sleep(1000);
|
||||
psingleinstancechecker = new wxSingleInstanceChecker(strMutexName);
|
||||
if (!psingleinstancechecker->IsAnotherRunning())
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Bind to the port early so we can tell if another instance is already running.
|
||||
// This is a backup to wxSingleInstanceChecker, which doesn't work on Linux.
|
||||
string strErrors;
|
||||
if (!BindListenPort(strErrors))
|
||||
{
|
||||
wxMessageBox(strErrors, "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Load data files
|
||||
//
|
||||
if (fDaemon)
|
||||
fprintf(stdout, "bitcoin server starting\n");
|
||||
strErrors = "";
|
||||
int64 nStart;
|
||||
|
||||
printf("Loading addresses...\n");
|
||||
nStart = GetTimeMillis();
|
||||
if (!LoadAddresses())
|
||||
strErrors += _("Error loading addr.dat \n");
|
||||
printf(" addresses %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
printf("Loading block index...\n");
|
||||
nStart = GetTimeMillis();
|
||||
if (!LoadBlockIndex())
|
||||
strErrors += _("Error loading blkindex.dat \n");
|
||||
printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
printf("Loading wallet...\n");
|
||||
nStart = GetTimeMillis();
|
||||
bool fFirstRun;
|
||||
if (!LoadWallet(fFirstRun))
|
||||
strErrors += _("Error loading wallet.dat \n");
|
||||
printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
printf("Done loading\n");
|
||||
|
||||
//// debug print
|
||||
printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size());
|
||||
printf("nBestHeight = %d\n", nBestHeight);
|
||||
printf("mapKeys.size() = %d\n", mapKeys.size());
|
||||
printf("mapPubKeys.size() = %d\n", mapPubKeys.size());
|
||||
printf("mapWallet.size() = %d\n", mapWallet.size());
|
||||
printf("mapAddressBook.size() = %d\n", mapAddressBook.size());
|
||||
|
||||
if (!strErrors.empty())
|
||||
{
|
||||
wxMessageBox(strErrors, "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add wallet transactions that aren't already in a block to mapTransactions
|
||||
ReacceptWalletTransactions();
|
||||
|
||||
//
|
||||
// Parameters
|
||||
//
|
||||
if (mapArgs.count("-printblockindex") || mapArgs.count("-printblocktree"))
|
||||
{
|
||||
PrintBlockTree();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mapArgs.count("-printblock"))
|
||||
{
|
||||
string strMatch = mapArgs["-printblock"];
|
||||
int nFound = 0;
|
||||
for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
|
||||
{
|
||||
uint256 hash = (*mi).first;
|
||||
if (strncmp(hash.ToString().c_str(), strMatch.c_str(), strMatch.size()) == 0)
|
||||
{
|
||||
CBlockIndex* pindex = (*mi).second;
|
||||
CBlock block;
|
||||
block.ReadFromDisk(pindex);
|
||||
block.BuildMerkleTree();
|
||||
block.print();
|
||||
printf("\n");
|
||||
nFound++;
|
||||
}
|
||||
}
|
||||
if (nFound == 0)
|
||||
printf("No blocks matching %s were found\n", strMatch.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mapArgs.count("-gen"))
|
||||
{
|
||||
if (mapArgs["-gen"].empty())
|
||||
fGenerateBitcoins = true;
|
||||
else
|
||||
fGenerateBitcoins = (atoi(mapArgs["-gen"].c_str()) != 0);
|
||||
}
|
||||
|
||||
if (mapArgs.count("-proxy"))
|
||||
{
|
||||
fUseProxy = true;
|
||||
addrProxy = CAddress(mapArgs["-proxy"]);
|
||||
if (!addrProxy.IsValid())
|
||||
{
|
||||
wxMessageBox(_("Invalid -proxy address"), "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (mapArgs.count("-addnode"))
|
||||
{
|
||||
foreach(string strAddr, mapMultiArgs["-addnode"])
|
||||
{
|
||||
CAddress addr(strAddr, NODE_NETWORK);
|
||||
addr.nTime = 0; // so it won't relay unless successfully connected
|
||||
if (addr.IsValid())
|
||||
AddAddress(addr);
|
||||
}
|
||||
}
|
||||
|
||||
if (mapArgs.count("-paytxfee"))
|
||||
{
|
||||
if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
|
||||
{
|
||||
wxMessageBox(_("Invalid amount for -paytxfee=<amount>"), "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
if (nTransactionFee > 1 * COIN)
|
||||
wxMessageBox(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."), "Bitcoin");
|
||||
}
|
||||
|
||||
//
|
||||
// Create the main window and start the node
|
||||
//
|
||||
#ifdef GUI
|
||||
if (!fDaemon)
|
||||
CreateMainWindow();
|
||||
#endif
|
||||
|
||||
if (!CheckDiskSpace())
|
||||
return false;
|
||||
|
||||
RandAddSeedPerfmon();
|
||||
|
||||
if (!CreateThread(StartNode, NULL))
|
||||
wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin");
|
||||
|
||||
if (mapArgs.count("-server") || fDaemon)
|
||||
CreateThread(ThreadRPCServer, NULL);
|
||||
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
if (fFirstRun)
|
||||
SetStartOnSystemStartup(true);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
#include "headers.h"
|
||||
#include "db.h"
|
||||
#include "rpc.h"
|
||||
#include "net.h"
|
||||
#include "init.h"
|
||||
#include "strlcpy.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
CWallet* pwalletMain;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Shutdown
|
||||
//
|
||||
|
||||
void ExitTimeout(void* parg)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
Sleep(5000);
|
||||
ExitProcess(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Shutdown(void* parg)
|
||||
{
|
||||
static CCriticalSection cs_Shutdown;
|
||||
static bool fTaken;
|
||||
bool fFirstThread;
|
||||
CRITICAL_BLOCK(cs_Shutdown)
|
||||
{
|
||||
fFirstThread = !fTaken;
|
||||
fTaken = true;
|
||||
}
|
||||
static bool fExit;
|
||||
if (fFirstThread)
|
||||
{
|
||||
fShutdown = true;
|
||||
nTransactionsUpdated++;
|
||||
DBFlush(false);
|
||||
StopNode();
|
||||
DBFlush(true);
|
||||
boost::filesystem::remove(GetPidFile());
|
||||
UnregisterWallet(pwalletMain);
|
||||
delete pwalletMain;
|
||||
CreateThread(ExitTimeout, NULL);
|
||||
Sleep(50);
|
||||
printf("Bitcoin exiting\n\n");
|
||||
fExit = true;
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (!fExit)
|
||||
Sleep(500);
|
||||
Sleep(100);
|
||||
ExitThread(0);
|
||||
}
|
||||
}
|
||||
|
||||
void HandleSIGTERM(int)
|
||||
{
|
||||
fRequestShutdown = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Start
|
||||
//
|
||||
#ifndef GUI
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
bool fRet = false;
|
||||
fRet = AppInit(argc, argv);
|
||||
|
||||
if (fRet && fDaemon)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool AppInit(int argc, char* argv[])
|
||||
{
|
||||
bool fRet = false;
|
||||
try
|
||||
{
|
||||
fRet = AppInit2(argc, argv);
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
PrintException(&e, "AppInit()");
|
||||
} catch (...) {
|
||||
PrintException(NULL, "AppInit()");
|
||||
}
|
||||
if (!fRet)
|
||||
Shutdown(NULL);
|
||||
return fRet;
|
||||
}
|
||||
|
||||
bool AppInit2(int argc, char* argv[])
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
// Turn off microsoft heap dump noise
|
||||
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
|
||||
_CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
|
||||
#endif
|
||||
#if _MSC_VER >= 1400
|
||||
// Disable confusing "helpful" text message on abort, ctrl-c
|
||||
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
|
||||
#endif
|
||||
#ifndef __WXMSW__
|
||||
umask(077);
|
||||
#endif
|
||||
#ifndef __WXMSW__
|
||||
// Clean shutdown on SIGTERM
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = HandleSIGTERM;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
sigaction(SIGTERM, &sa, NULL);
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
sigaction(SIGHUP, &sa, NULL);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Parameters
|
||||
//
|
||||
ParseParameters(argc, argv);
|
||||
|
||||
if (mapArgs.count("-datadir"))
|
||||
{
|
||||
if (filesystem::is_directory(filesystem::system_complete(mapArgs["-datadir"])))
|
||||
{
|
||||
filesystem::path pathDataDir = filesystem::system_complete(mapArgs["-datadir"]);
|
||||
strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir));
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error: Specified directory does not exist\n");
|
||||
Shutdown(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ReadConfigFile(mapArgs, mapMultiArgs); // Must be done after processing datadir
|
||||
|
||||
if (mapArgs.count("-?") || mapArgs.count("--help"))
|
||||
{
|
||||
string strUsage = string() +
|
||||
_("Bitcoin version") + " " + FormatFullVersion() + "\n\n" +
|
||||
_("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" +
|
||||
" bitcoin [options] \t " + "\n" +
|
||||
" bitcoin [options] <command> [params]\t " + _("Send command to -server or bitcoind\n") +
|
||||
" bitcoin [options] help \t\t " + _("List commands\n") +
|
||||
" bitcoin [options] help <command> \t\t " + _("Get help for a command\n") +
|
||||
_("Options:\n") +
|
||||
" -conf=<file> \t\t " + _("Specify configuration file (default: bitcoin.conf)\n") +
|
||||
" -pid=<file> \t\t " + _("Specify pid file (default: bitcoind.pid)\n") +
|
||||
" -gen \t\t " + _("Generate coins\n") +
|
||||
" -gen=0 \t\t " + _("Don't generate coins\n") +
|
||||
" -min \t\t " + _("Start minimized\n") +
|
||||
" -datadir=<dir> \t\t " + _("Specify data directory\n") +
|
||||
" -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)\n") +
|
||||
" -proxy=<ip:port> \t " + _("Connect through socks4 proxy\n") +
|
||||
" -dns \t " + _("Allow DNS lookups for addnode and connect\n") +
|
||||
" -addnode=<ip> \t " + _("Add a node to connect to\n") +
|
||||
" -connect=<ip> \t\t " + _("Connect only to the specified node\n") +
|
||||
" -nolisten \t " + _("Don't accept connections from outside\n") +
|
||||
#ifdef USE_UPNP
|
||||
#if USE_UPNP
|
||||
" -noupnp \t " + _("Don't attempt to use UPnP to map the listening port\n") +
|
||||
#else
|
||||
" -upnp \t " + _("Attempt to use UPnP to map the listening port\n") +
|
||||
#endif
|
||||
#endif
|
||||
" -paytxfee=<amt> \t " + _("Fee per KB to add to transactions you send\n") +
|
||||
#ifdef GUI
|
||||
" -server \t\t " + _("Accept command line and JSON-RPC commands\n") +
|
||||
#endif
|
||||
#ifndef __WXMSW__
|
||||
" -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") +
|
||||
#endif
|
||||
" -testnet \t\t " + _("Use the test network\n") +
|
||||
" -rpcuser=<user> \t " + _("Username for JSON-RPC connections\n") +
|
||||
" -rpcpassword=<pw>\t " + _("Password for JSON-RPC connections\n") +
|
||||
" -rpcport=<port> \t\t " + _("Listen for JSON-RPC connections on <port> (default: 8332)\n") +
|
||||
" -rpcallowip=<ip> \t\t " + _("Allow JSON-RPC connections from specified IP address\n") +
|
||||
" -rpcconnect=<ip> \t " + _("Send commands to node running on <ip> (default: 127.0.0.1)\n") +
|
||||
" -keypool=<n> \t " + _("Set key pool size to <n> (default: 100)\n") +
|
||||
" -rescan \t " + _("Rescan the block chain for missing wallet transactions\n");
|
||||
|
||||
#ifdef USE_SSL
|
||||
strUsage += string() +
|
||||
_("\nSSL options: (see the Bitcoin Wiki for SSL setup instructions)\n") +
|
||||
" -rpcssl \t " + _("Use OpenSSL (https) for JSON-RPC connections\n") +
|
||||
" -rpcsslcertificatechainfile=<file.cert>\t " + _("Server certificate file (default: server.cert)\n") +
|
||||
" -rpcsslprivatekeyfile=<file.pem> \t " + _("Server private key (default: server.pem)\n") +
|
||||
" -rpcsslciphers=<ciphers> \t " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n");
|
||||
#endif
|
||||
|
||||
strUsage += string() +
|
||||
" -? \t\t " + _("This help message\n");
|
||||
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
// Tabs make the columns line up in the message box
|
||||
wxMessageBox(strUsage, "Bitcoin", wxOK);
|
||||
#else
|
||||
// Remove tabs
|
||||
strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end());
|
||||
fprintf(stderr, "%s", strUsage.c_str());
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
fDebug = GetBoolArg("-debug");
|
||||
fAllowDNS = GetBoolArg("-dns");
|
||||
|
||||
#ifndef __WXMSW__
|
||||
fDaemon = GetBoolArg("-daemon");
|
||||
#else
|
||||
fDaemon = false;
|
||||
#endif
|
||||
|
||||
if (fDaemon)
|
||||
fServer = true;
|
||||
else
|
||||
fServer = GetBoolArg("-server");
|
||||
|
||||
/* force fServer when running without GUI */
|
||||
#ifndef GUI
|
||||
fServer = true;
|
||||
#endif
|
||||
|
||||
fPrintToConsole = GetBoolArg("-printtoconsole");
|
||||
fPrintToDebugger = GetBoolArg("-printtodebugger");
|
||||
|
||||
fTestNet = GetBoolArg("-testnet");
|
||||
fNoListen = GetBoolArg("-nolisten");
|
||||
fLogTimestamps = GetBoolArg("-logtimestamps");
|
||||
|
||||
for (int i = 1; i < argc; i++)
|
||||
if (!IsSwitchChar(argv[i][0]))
|
||||
fCommandLine = true;
|
||||
|
||||
if (fCommandLine)
|
||||
{
|
||||
int ret = CommandLineRPC(argc, argv);
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
#ifndef __WXMSW__
|
||||
if (fDaemon)
|
||||
{
|
||||
// Daemonize
|
||||
pid_t pid = fork();
|
||||
if (pid < 0)
|
||||
{
|
||||
fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno);
|
||||
return false;
|
||||
}
|
||||
if (pid > 0)
|
||||
{
|
||||
CreatePidFile(GetPidFile(), pid);
|
||||
return true;
|
||||
}
|
||||
|
||||
pid_t sid = setsid();
|
||||
if (sid < 0)
|
||||
fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!fDebug && !pszSetDataDir[0])
|
||||
ShrinkDebugFile();
|
||||
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||
printf("Bitcoin version %s\n", FormatFullVersion().c_str());
|
||||
#ifdef GUI
|
||||
printf("OS version %s\n", ((string)wxGetOsDescription()).c_str());
|
||||
printf("System default language is %d %s\n", g_locale.GetSystemLanguage(), ((string)g_locale.GetSysName()).c_str());
|
||||
printf("Language file %s (%s)\n", (string("locale/") + (string)g_locale.GetCanonicalName() + "/LC_MESSAGES/bitcoin.mo").c_str(), ((string)g_locale.GetLocale()).c_str());
|
||||
#endif
|
||||
printf("Default data directory %s\n", GetDefaultDataDir().c_str());
|
||||
|
||||
if (GetBoolArg("-loadblockindextest"))
|
||||
{
|
||||
CTxDB txdb("r");
|
||||
txdb.LoadBlockIndex();
|
||||
PrintBlockTree();
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Limit to single instance per user
|
||||
// Required to protect the database files if we're going to keep deleting log.*
|
||||
//
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
// wxSingleInstanceChecker doesn't work on Linux
|
||||
wxString strMutexName = wxString("bitcoin_running.") + getenv("HOMEPATH");
|
||||
for (int i = 0; i < strMutexName.size(); i++)
|
||||
if (!isalnum(strMutexName[i]))
|
||||
strMutexName[i] = '.';
|
||||
wxSingleInstanceChecker* psingleinstancechecker = new wxSingleInstanceChecker(strMutexName);
|
||||
if (psingleinstancechecker->IsAnotherRunning())
|
||||
{
|
||||
printf("Existing instance found\n");
|
||||
unsigned int nStart = GetTime();
|
||||
loop
|
||||
{
|
||||
// Show the previous instance and exit
|
||||
HWND hwndPrev = FindWindowA("wxWindowClassNR", "Bitcoin");
|
||||
if (hwndPrev)
|
||||
{
|
||||
if (IsIconic(hwndPrev))
|
||||
ShowWindow(hwndPrev, SW_RESTORE);
|
||||
SetForegroundWindow(hwndPrev);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetTime() > nStart + 60)
|
||||
return false;
|
||||
|
||||
// Resume this instance if the other exits
|
||||
delete psingleinstancechecker;
|
||||
Sleep(1000);
|
||||
psingleinstancechecker = new wxSingleInstanceChecker(strMutexName);
|
||||
if (!psingleinstancechecker->IsAnotherRunning())
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Make sure only a single bitcoin process is using the data directory.
|
||||
string strLockFile = GetDataDir() + "/.lock";
|
||||
FILE* file = fopen(strLockFile.c_str(), "a"); // empty lock file; created if it doesn't exist.
|
||||
if (file) fclose(file);
|
||||
static boost::interprocess::file_lock lock(strLockFile.c_str());
|
||||
if (!lock.try_lock())
|
||||
{
|
||||
wxMessageBox(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin is probably already running."), GetDataDir().c_str()), "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind to the port early so we can tell if another instance is already running.
|
||||
string strErrors;
|
||||
if (!fNoListen)
|
||||
{
|
||||
if (!BindListenPort(strErrors))
|
||||
{
|
||||
wxMessageBox(strErrors, "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Load data files
|
||||
//
|
||||
if (fDaemon)
|
||||
fprintf(stdout, "bitcoin server starting\n");
|
||||
strErrors = "";
|
||||
int64 nStart;
|
||||
|
||||
printf("Loading addresses...\n");
|
||||
nStart = GetTimeMillis();
|
||||
if (!LoadAddresses())
|
||||
strErrors += _("Error loading addr.dat \n");
|
||||
printf(" addresses %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
printf("Loading block index...\n");
|
||||
nStart = GetTimeMillis();
|
||||
if (!LoadBlockIndex())
|
||||
strErrors += _("Error loading blkindex.dat \n");
|
||||
printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
printf("Loading wallet...\n");
|
||||
nStart = GetTimeMillis();
|
||||
bool fFirstRun;
|
||||
pwalletMain = new CWallet("wallet.dat");
|
||||
if (!pwalletMain->LoadWallet(fFirstRun))
|
||||
strErrors += _("Error loading wallet.dat \n");
|
||||
printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
RegisterWallet(pwalletMain);
|
||||
|
||||
CBlockIndex *pindexRescan = pindexBest;
|
||||
if (GetBoolArg("-rescan"))
|
||||
pindexRescan = pindexGenesisBlock;
|
||||
else
|
||||
{
|
||||
CWalletDB walletdb("wallet.dat");
|
||||
CBlockLocator locator;
|
||||
if (walletdb.ReadBestBlock(locator))
|
||||
pindexRescan = locator.GetBlockIndex();
|
||||
}
|
||||
if (pindexBest != pindexRescan)
|
||||
{
|
||||
printf("Rescanning last %i blocks (from block %i)...\n", pindexBest->nHeight - pindexRescan->nHeight, pindexRescan->nHeight);
|
||||
nStart = GetTimeMillis();
|
||||
pwalletMain->ScanForWalletTransactions(pindexRescan, true);
|
||||
printf(" rescan %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
}
|
||||
|
||||
printf("Done loading\n");
|
||||
|
||||
//// debug print
|
||||
printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size());
|
||||
printf("nBestHeight = %d\n", nBestHeight);
|
||||
printf("mapKeys.size() = %d\n", pwalletMain->mapKeys.size());
|
||||
printf("setKeyPool.size() = %d\n", pwalletMain->setKeyPool.size());
|
||||
printf("mapPubKeys.size() = %d\n", mapPubKeys.size());
|
||||
printf("mapWallet.size() = %d\n", pwalletMain->mapWallet.size());
|
||||
printf("mapAddressBook.size() = %d\n", pwalletMain->mapAddressBook.size());
|
||||
|
||||
if (!strErrors.empty())
|
||||
{
|
||||
wxMessageBox(strErrors, "Bitcoin", wxOK | wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add wallet transactions that aren't already in a block to mapTransactions
|
||||
pwalletMain->ReacceptWalletTransactions();
|
||||
|
||||
//
|
||||
// Parameters
|
||||
//
|
||||
if (GetBoolArg("-printblockindex") || GetBoolArg("-printblocktree"))
|
||||
{
|
||||
PrintBlockTree();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mapArgs.count("-timeout"))
|
||||
{
|
||||
int nNewTimeout = GetArg("-timeout", 5000);
|
||||
if (nNewTimeout > 0 && nNewTimeout < 600000)
|
||||
nConnectTimeout = nNewTimeout;
|
||||
}
|
||||
|
||||
if (mapArgs.count("-printblock"))
|
||||
{
|
||||
string strMatch = mapArgs["-printblock"];
|
||||
int nFound = 0;
|
||||
for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
|
||||
{
|
||||
uint256 hash = (*mi).first;
|
||||
if (strncmp(hash.ToString().c_str(), strMatch.c_str(), strMatch.size()) == 0)
|
||||
{
|
||||
CBlockIndex* pindex = (*mi).second;
|
||||
CBlock block;
|
||||
block.ReadFromDisk(pindex);
|
||||
block.BuildMerkleTree();
|
||||
block.print();
|
||||
printf("\n");
|
||||
nFound++;
|
||||
}
|
||||
}
|
||||
if (nFound == 0)
|
||||
printf("No blocks matching %s were found\n", strMatch.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
fGenerateBitcoins = GetBoolArg("-gen");
|
||||
|
||||
if (mapArgs.count("-proxy"))
|
||||
{
|
||||
fUseProxy = true;
|
||||
addrProxy = CAddress(mapArgs["-proxy"]);
|
||||
if (!addrProxy.IsValid())
|
||||
{
|
||||
wxMessageBox(_("Invalid -proxy address"), "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (mapArgs.count("-addnode"))
|
||||
{
|
||||
BOOST_FOREACH(string strAddr, mapMultiArgs["-addnode"])
|
||||
{
|
||||
CAddress addr(strAddr, fAllowDNS);
|
||||
addr.nTime = 0; // so it won't relay unless successfully connected
|
||||
if (addr.IsValid())
|
||||
AddAddress(addr);
|
||||
}
|
||||
}
|
||||
|
||||
if (GetBoolArg("-nodnsseed"))
|
||||
printf("DNS seeding disabled\n");
|
||||
else
|
||||
DNSAddressSeed();
|
||||
|
||||
if (mapArgs.count("-paytxfee"))
|
||||
{
|
||||
if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
|
||||
{
|
||||
wxMessageBox(_("Invalid amount for -paytxfee=<amount>"), "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
if (nTransactionFee > 0.25 * COIN)
|
||||
wxMessageBox(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."), "Bitcoin", wxOK | wxICON_EXCLAMATION);
|
||||
}
|
||||
|
||||
if (fHaveUPnP)
|
||||
{
|
||||
#if USE_UPNP
|
||||
if (GetBoolArg("-noupnp"))
|
||||
fUseUPnP = false;
|
||||
#else
|
||||
if (GetBoolArg("-upnp"))
|
||||
fUseUPnP = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Create the main window and start the node
|
||||
//
|
||||
#ifdef GUI
|
||||
if (!fDaemon)
|
||||
CreateMainWindow();
|
||||
#endif
|
||||
|
||||
if (!CheckDiskSpace())
|
||||
return false;
|
||||
|
||||
RandAddSeedPerfmon();
|
||||
|
||||
if (!CreateThread(StartNode, NULL))
|
||||
wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin");
|
||||
|
||||
if (fServer)
|
||||
CreateThread(ThreadRPCServer, NULL);
|
||||
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
if (fFirstRun)
|
||||
SetStartOnSystemStartup(true);
|
||||
#endif
|
||||
|
||||
#ifndef GUI
|
||||
while (1)
|
||||
Sleep(5000);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1,7 +1,13 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
void Shutdown(void* parg);
|
||||
bool AppInit(int argc, char* argv[]);
|
||||
bool AppInit2(int argc, char* argv[]);
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
#ifndef BITCOIN_INIT_H
|
||||
#define BITCOIN_INIT_H
|
||||
|
||||
extern CWallet* pwalletMain;
|
||||
|
||||
void Shutdown(void* parg);
|
||||
bool AppInit(int argc, char* argv[]);
|
||||
bool AppInit2(int argc, char* argv[]);
|
||||
|
||||
#endif
|
||||
@@ -1,328 +1,448 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "headers.h"
|
||||
|
||||
int nGotIRCAddresses = 0;
|
||||
|
||||
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct ircaddr
|
||||
{
|
||||
int ip;
|
||||
short port;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
string EncodeAddress(const CAddress& addr)
|
||||
{
|
||||
struct ircaddr tmp;
|
||||
tmp.ip = addr.ip;
|
||||
tmp.port = addr.port;
|
||||
|
||||
vector<unsigned char> vch(UBEGIN(tmp), UEND(tmp));
|
||||
return string("u") + EncodeBase58Check(vch);
|
||||
}
|
||||
|
||||
bool DecodeAddress(string str, CAddress& addr)
|
||||
{
|
||||
vector<unsigned char> vch;
|
||||
if (!DecodeBase58Check(str.substr(1), vch))
|
||||
return false;
|
||||
|
||||
struct ircaddr tmp;
|
||||
if (vch.size() != sizeof(tmp))
|
||||
return false;
|
||||
memcpy(&tmp, &vch[0], sizeof(tmp));
|
||||
|
||||
addr = CAddress(tmp.ip, tmp.port, NODE_NETWORK);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static bool Send(SOCKET hSocket, const char* pszSend)
|
||||
{
|
||||
if (strstr(pszSend, "PONG") != pszSend)
|
||||
printf("IRC SENDING: %s\n", pszSend);
|
||||
const char* psz = pszSend;
|
||||
const char* pszEnd = psz + strlen(psz);
|
||||
while (psz < pszEnd)
|
||||
{
|
||||
int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL);
|
||||
if (ret < 0)
|
||||
return false;
|
||||
psz += ret;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RecvLine(SOCKET hSocket, string& strLine)
|
||||
{
|
||||
strLine = "";
|
||||
loop
|
||||
{
|
||||
char c;
|
||||
int nBytes = recv(hSocket, &c, 1, 0);
|
||||
if (nBytes > 0)
|
||||
{
|
||||
if (c == '\n')
|
||||
continue;
|
||||
if (c == '\r')
|
||||
return true;
|
||||
strLine += c;
|
||||
if (strLine.size() >= 9000)
|
||||
return true;
|
||||
}
|
||||
else if (nBytes <= 0)
|
||||
{
|
||||
if (!strLine.empty())
|
||||
return true;
|
||||
// socket closed
|
||||
printf("IRC socket closed\n");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// socket error
|
||||
int nErr = WSAGetLastError();
|
||||
if (nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS)
|
||||
{
|
||||
printf("IRC recv failed: %d\n", nErr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool RecvLineIRC(SOCKET hSocket, string& strLine)
|
||||
{
|
||||
loop
|
||||
{
|
||||
bool fRet = RecvLine(hSocket, strLine);
|
||||
if (fRet)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
vector<string> vWords;
|
||||
ParseString(strLine, ' ', vWords);
|
||||
if (vWords.size() >= 1 && vWords[0] == "PING")
|
||||
{
|
||||
strLine[1] = 'O';
|
||||
strLine += '\r';
|
||||
Send(hSocket, strLine.c_str());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return fRet;
|
||||
}
|
||||
}
|
||||
|
||||
int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL)
|
||||
{
|
||||
loop
|
||||
{
|
||||
string strLine;
|
||||
if (!RecvLineIRC(hSocket, strLine))
|
||||
return 0;
|
||||
printf("IRC %s\n", strLine.c_str());
|
||||
if (psz1 && strLine.find(psz1) != -1)
|
||||
return 1;
|
||||
if (psz2 && strLine.find(psz2) != -1)
|
||||
return 2;
|
||||
if (psz3 && strLine.find(psz3) != -1)
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
bool Wait(int nSeconds)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
printf("IRC waiting %d seconds to reconnect\n", nSeconds);
|
||||
for (int i = 0; i < nSeconds; i++)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
Sleep(1000);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ThreadIRCSeed(void* parg)
|
||||
{
|
||||
if (mapArgs.count("-connect"))
|
||||
return;
|
||||
if (mapArgs.count("-noirc"))
|
||||
return;
|
||||
printf("ThreadIRCSeed started\n");
|
||||
int nErrorWait = 10;
|
||||
int nRetryWait = 10;
|
||||
bool fNameInUse = false;
|
||||
bool fTOR = (fUseProxy && addrProxy.port == htons(9050));
|
||||
|
||||
while (!fShutdown)
|
||||
{
|
||||
//CAddress addrConnect("216.155.130.130:6667"); // chat.freenode.net
|
||||
CAddress addrConnect("92.243.23.21:6667"); // irc.lfnet.org
|
||||
if (!fTOR)
|
||||
{
|
||||
//struct hostent* phostent = gethostbyname("chat.freenode.net");
|
||||
struct hostent* phostent = gethostbyname("irc.lfnet.org");
|
||||
if (phostent && phostent->h_addr_list && phostent->h_addr_list[0])
|
||||
addrConnect = CAddress(*(u_long*)phostent->h_addr_list[0], htons(6667));
|
||||
}
|
||||
|
||||
SOCKET hSocket;
|
||||
if (!ConnectSocket(addrConnect, hSocket))
|
||||
{
|
||||
printf("IRC connect failed\n");
|
||||
nErrorWait = nErrorWait * 11 / 10;
|
||||
if (Wait(nErrorWait += 60))
|
||||
continue;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname"))
|
||||
{
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
nErrorWait = nErrorWait * 11 / 10;
|
||||
if (Wait(nErrorWait += 60))
|
||||
continue;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
string strMyName;
|
||||
if (addrLocalHost.IsRoutable() && !fUseProxy && !fNameInUse)
|
||||
strMyName = EncodeAddress(addrLocalHost);
|
||||
else
|
||||
strMyName = strprintf("x%u", GetRand(1000000000));
|
||||
|
||||
Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
|
||||
Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str());
|
||||
|
||||
int nRet = RecvUntil(hSocket, " 004 ", " 433 ");
|
||||
if (nRet != 1)
|
||||
{
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
if (nRet == 2)
|
||||
{
|
||||
printf("IRC name already in use\n");
|
||||
fNameInUse = true;
|
||||
Wait(10);
|
||||
continue;
|
||||
}
|
||||
nErrorWait = nErrorWait * 11 / 10;
|
||||
if (Wait(nErrorWait += 60))
|
||||
continue;
|
||||
else
|
||||
return;
|
||||
}
|
||||
Sleep(500);
|
||||
|
||||
Send(hSocket, "JOIN #bitcoin\r");
|
||||
Send(hSocket, "WHO #bitcoin\r");
|
||||
|
||||
int64 nStart = GetTime();
|
||||
string strLine;
|
||||
while (!fShutdown && RecvLineIRC(hSocket, strLine))
|
||||
{
|
||||
if (strLine.empty() || strLine.size() > 900 || strLine[0] != ':')
|
||||
continue;
|
||||
|
||||
vector<string> vWords;
|
||||
ParseString(strLine, ' ', vWords);
|
||||
if (vWords.size() < 2)
|
||||
continue;
|
||||
|
||||
char pszName[10000];
|
||||
pszName[0] = '\0';
|
||||
|
||||
if (vWords[1] == "352" && vWords.size() >= 8)
|
||||
{
|
||||
// index 7 is limited to 16 characters
|
||||
// could get full length name at index 10, but would be different from join messages
|
||||
strlcpy(pszName, vWords[7].c_str(), sizeof(pszName));
|
||||
printf("IRC got who\n");
|
||||
}
|
||||
|
||||
if (vWords[1] == "JOIN" && vWords[0].size() > 1)
|
||||
{
|
||||
// :username!username@50000007.F000000B.90000002.IP JOIN :#channelname
|
||||
strlcpy(pszName, vWords[0].c_str() + 1, sizeof(pszName));
|
||||
if (strchr(pszName, '!'))
|
||||
*strchr(pszName, '!') = '\0';
|
||||
printf("IRC got join\n");
|
||||
}
|
||||
|
||||
if (pszName[0] == 'u')
|
||||
{
|
||||
CAddress addr;
|
||||
if (DecodeAddress(pszName, addr))
|
||||
{
|
||||
addr.nTime = GetAdjustedTime() - 51 * 60;
|
||||
if (AddAddress(addr))
|
||||
printf("IRC got new address\n");
|
||||
nGotIRCAddresses++;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("IRC decode failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
|
||||
// IRC usually blocks TOR, so only try once
|
||||
if (fTOR)
|
||||
return;
|
||||
|
||||
if (GetTime() - nStart > 20 * 60)
|
||||
{
|
||||
nErrorWait /= 3;
|
||||
nRetryWait /= 3;
|
||||
}
|
||||
|
||||
nRetryWait = nRetryWait * 11 / 10;
|
||||
if (!Wait(nRetryWait += 60))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef TEST
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
WSADATA wsadata;
|
||||
if (WSAStartup(MAKEWORD(2,2), &wsadata) != NO_ERROR)
|
||||
{
|
||||
printf("Error at WSAStartup()\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
ThreadIRCSeed(NULL);
|
||||
|
||||
WSACleanup();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "headers.h"
|
||||
#include "irc.h"
|
||||
#include "net.h"
|
||||
#include "strlcpy.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
int nGotIRCAddresses = 0;
|
||||
bool fGotExternalIP = false;
|
||||
|
||||
void ThreadIRCSeed2(void* parg);
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct ircaddr
|
||||
{
|
||||
int ip;
|
||||
short port;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
string EncodeAddress(const CAddress& addr)
|
||||
{
|
||||
struct ircaddr tmp;
|
||||
tmp.ip = addr.ip;
|
||||
tmp.port = addr.port;
|
||||
|
||||
vector<unsigned char> vch(UBEGIN(tmp), UEND(tmp));
|
||||
return string("u") + EncodeBase58Check(vch);
|
||||
}
|
||||
|
||||
bool DecodeAddress(string str, CAddress& addr)
|
||||
{
|
||||
vector<unsigned char> vch;
|
||||
if (!DecodeBase58Check(str.substr(1), vch))
|
||||
return false;
|
||||
|
||||
struct ircaddr tmp;
|
||||
if (vch.size() != sizeof(tmp))
|
||||
return false;
|
||||
memcpy(&tmp, &vch[0], sizeof(tmp));
|
||||
|
||||
addr = CAddress(tmp.ip, ntohs(tmp.port), NODE_NETWORK);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static bool Send(SOCKET hSocket, const char* pszSend)
|
||||
{
|
||||
if (strstr(pszSend, "PONG") != pszSend)
|
||||
printf("IRC SENDING: %s\n", pszSend);
|
||||
const char* psz = pszSend;
|
||||
const char* pszEnd = psz + strlen(psz);
|
||||
while (psz < pszEnd)
|
||||
{
|
||||
int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL);
|
||||
if (ret < 0)
|
||||
return false;
|
||||
psz += ret;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RecvLine(SOCKET hSocket, string& strLine)
|
||||
{
|
||||
strLine = "";
|
||||
loop
|
||||
{
|
||||
char c;
|
||||
int nBytes = recv(hSocket, &c, 1, 0);
|
||||
if (nBytes > 0)
|
||||
{
|
||||
if (c == '\n')
|
||||
continue;
|
||||
if (c == '\r')
|
||||
return true;
|
||||
strLine += c;
|
||||
if (strLine.size() >= 9000)
|
||||
return true;
|
||||
}
|
||||
else if (nBytes <= 0)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
if (nBytes < 0)
|
||||
{
|
||||
int nErr = WSAGetLastError();
|
||||
if (nErr == WSAEMSGSIZE)
|
||||
continue;
|
||||
if (nErr == WSAEWOULDBLOCK || nErr == WSAEINTR || nErr == WSAEINPROGRESS)
|
||||
{
|
||||
Sleep(10);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!strLine.empty())
|
||||
return true;
|
||||
if (nBytes == 0)
|
||||
{
|
||||
// socket closed
|
||||
printf("IRC socket closed\n");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// socket error
|
||||
int nErr = WSAGetLastError();
|
||||
printf("IRC recv failed: %d\n", nErr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool RecvLineIRC(SOCKET hSocket, string& strLine)
|
||||
{
|
||||
loop
|
||||
{
|
||||
bool fRet = RecvLine(hSocket, strLine);
|
||||
if (fRet)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
vector<string> vWords;
|
||||
ParseString(strLine, ' ', vWords);
|
||||
if (vWords.size() >= 1 && vWords[0] == "PING")
|
||||
{
|
||||
strLine[1] = 'O';
|
||||
strLine += '\r';
|
||||
Send(hSocket, strLine.c_str());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return fRet;
|
||||
}
|
||||
}
|
||||
|
||||
int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL)
|
||||
{
|
||||
loop
|
||||
{
|
||||
string strLine;
|
||||
strLine.reserve(10000);
|
||||
if (!RecvLineIRC(hSocket, strLine))
|
||||
return 0;
|
||||
printf("IRC %s\n", strLine.c_str());
|
||||
if (psz1 && strLine.find(psz1) != -1)
|
||||
return 1;
|
||||
if (psz2 && strLine.find(psz2) != -1)
|
||||
return 2;
|
||||
if (psz3 && strLine.find(psz3) != -1)
|
||||
return 3;
|
||||
if (psz4 && strLine.find(psz4) != -1)
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
bool Wait(int nSeconds)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
printf("IRC waiting %d seconds to reconnect\n", nSeconds);
|
||||
for (int i = 0; i < nSeconds; i++)
|
||||
{
|
||||
if (fShutdown)
|
||||
return false;
|
||||
Sleep(1000);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet)
|
||||
{
|
||||
strRet.clear();
|
||||
loop
|
||||
{
|
||||
string strLine;
|
||||
if (!RecvLineIRC(hSocket, strLine))
|
||||
return false;
|
||||
|
||||
vector<string> vWords;
|
||||
ParseString(strLine, ' ', vWords);
|
||||
if (vWords.size() < 2)
|
||||
continue;
|
||||
|
||||
if (vWords[1] == psz1)
|
||||
{
|
||||
printf("IRC %s\n", strLine.c_str());
|
||||
strRet = strLine;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool GetIPFromIRC(SOCKET hSocket, string strMyName, unsigned int& ipRet)
|
||||
{
|
||||
Send(hSocket, strprintf("USERHOST %s\r", strMyName.c_str()).c_str());
|
||||
|
||||
string strLine;
|
||||
if (!RecvCodeLine(hSocket, "302", strLine))
|
||||
return false;
|
||||
|
||||
vector<string> vWords;
|
||||
ParseString(strLine, ' ', vWords);
|
||||
if (vWords.size() < 4)
|
||||
return false;
|
||||
|
||||
string str = vWords[3];
|
||||
if (str.rfind("@") == string::npos)
|
||||
return false;
|
||||
string strHost = str.substr(str.rfind("@")+1);
|
||||
|
||||
// Hybrid IRC used by lfnet always returns IP when you userhost yourself,
|
||||
// but in case another IRC is ever used this should work.
|
||||
printf("GetIPFromIRC() got userhost %s\n", strHost.c_str());
|
||||
if (fUseProxy)
|
||||
return false;
|
||||
CAddress addr(strHost, 0, true);
|
||||
if (!addr.IsValid())
|
||||
return false;
|
||||
ipRet = addr.ip;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ThreadIRCSeed(void* parg)
|
||||
{
|
||||
IMPLEMENT_RANDOMIZE_STACK(ThreadIRCSeed(parg));
|
||||
try
|
||||
{
|
||||
ThreadIRCSeed2(parg);
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
PrintExceptionContinue(&e, "ThreadIRCSeed()");
|
||||
} catch (...) {
|
||||
PrintExceptionContinue(NULL, "ThreadIRCSeed()");
|
||||
}
|
||||
printf("ThreadIRCSeed exiting\n");
|
||||
}
|
||||
|
||||
void ThreadIRCSeed2(void* parg)
|
||||
{
|
||||
/* Dont advertise on IRC if we don't allow incoming connections */
|
||||
if (mapArgs.count("-connect") || fNoListen)
|
||||
return;
|
||||
|
||||
if (GetBoolArg("-noirc"))
|
||||
return;
|
||||
printf("ThreadIRCSeed started\n");
|
||||
int nErrorWait = 10;
|
||||
int nRetryWait = 10;
|
||||
bool fNameInUse = false;
|
||||
bool fTOR = (fUseProxy && addrProxy.port == htons(9050));
|
||||
|
||||
while (!fShutdown)
|
||||
{
|
||||
//CAddress addrConnect("216.155.130.130:6667"); // chat.freenode.net
|
||||
CAddress addrConnect("92.243.23.21", 6667); // irc.lfnet.org
|
||||
if (!fTOR)
|
||||
{
|
||||
//struct hostent* phostent = gethostbyname("chat.freenode.net");
|
||||
CAddress addrIRC("irc.lfnet.org", 6667, true);
|
||||
if (addrIRC.IsValid())
|
||||
addrConnect = addrIRC;
|
||||
}
|
||||
|
||||
SOCKET hSocket;
|
||||
if (!ConnectSocket(addrConnect, hSocket))
|
||||
{
|
||||
printf("IRC connect failed\n");
|
||||
nErrorWait = nErrorWait * 11 / 10;
|
||||
if (Wait(nErrorWait += 60))
|
||||
continue;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname", "ignoring hostname"))
|
||||
{
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
nErrorWait = nErrorWait * 11 / 10;
|
||||
if (Wait(nErrorWait += 60))
|
||||
continue;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
string strMyName;
|
||||
if (addrLocalHost.IsRoutable() && !fUseProxy && !fNameInUse)
|
||||
strMyName = EncodeAddress(addrLocalHost);
|
||||
else
|
||||
strMyName = strprintf("x%u", GetRand(1000000000));
|
||||
|
||||
Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
|
||||
Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str());
|
||||
|
||||
int nRet = RecvUntil(hSocket, " 004 ", " 433 ");
|
||||
if (nRet != 1)
|
||||
{
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
if (nRet == 2)
|
||||
{
|
||||
printf("IRC name already in use\n");
|
||||
fNameInUse = true;
|
||||
Wait(10);
|
||||
continue;
|
||||
}
|
||||
nErrorWait = nErrorWait * 11 / 10;
|
||||
if (Wait(nErrorWait += 60))
|
||||
continue;
|
||||
else
|
||||
return;
|
||||
}
|
||||
Sleep(500);
|
||||
|
||||
// Get our external IP from the IRC server and re-nick before joining the channel
|
||||
CAddress addrFromIRC;
|
||||
if (GetIPFromIRC(hSocket, strMyName, addrFromIRC.ip))
|
||||
{
|
||||
printf("GetIPFromIRC() returned %s\n", addrFromIRC.ToStringIP().c_str());
|
||||
if (!fUseProxy && addrFromIRC.IsRoutable())
|
||||
{
|
||||
// IRC lets you to re-nick
|
||||
fGotExternalIP = true;
|
||||
addrLocalHost.ip = addrFromIRC.ip;
|
||||
strMyName = EncodeAddress(addrLocalHost);
|
||||
Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (fTestNet) {
|
||||
Send(hSocket, "JOIN #bitcoinTEST\r");
|
||||
Send(hSocket, "WHO #bitcoinTEST\r");
|
||||
} else {
|
||||
// randomly join #bitcoin00-#bitcoin99
|
||||
int channel_number = GetRandInt(100);
|
||||
Send(hSocket, strprintf("JOIN #bitcoin%02d\r", channel_number).c_str());
|
||||
Send(hSocket, strprintf("WHO #bitcoin%02d\r", channel_number).c_str());
|
||||
}
|
||||
|
||||
int64 nStart = GetTime();
|
||||
string strLine;
|
||||
strLine.reserve(10000);
|
||||
while (!fShutdown && RecvLineIRC(hSocket, strLine))
|
||||
{
|
||||
if (strLine.empty() || strLine.size() > 900 || strLine[0] != ':')
|
||||
continue;
|
||||
|
||||
vector<string> vWords;
|
||||
ParseString(strLine, ' ', vWords);
|
||||
if (vWords.size() < 2)
|
||||
continue;
|
||||
|
||||
char pszName[10000];
|
||||
pszName[0] = '\0';
|
||||
|
||||
if (vWords[1] == "352" && vWords.size() >= 8)
|
||||
{
|
||||
// index 7 is limited to 16 characters
|
||||
// could get full length name at index 10, but would be different from join messages
|
||||
strlcpy(pszName, vWords[7].c_str(), sizeof(pszName));
|
||||
printf("IRC got who\n");
|
||||
}
|
||||
|
||||
if (vWords[1] == "JOIN" && vWords[0].size() > 1)
|
||||
{
|
||||
// :username!username@50000007.F000000B.90000002.IP JOIN :#channelname
|
||||
strlcpy(pszName, vWords[0].c_str() + 1, sizeof(pszName));
|
||||
if (strchr(pszName, '!'))
|
||||
*strchr(pszName, '!') = '\0';
|
||||
printf("IRC got join\n");
|
||||
}
|
||||
|
||||
if (pszName[0] == 'u')
|
||||
{
|
||||
CAddress addr;
|
||||
if (DecodeAddress(pszName, addr))
|
||||
{
|
||||
addr.nTime = GetAdjustedTime();
|
||||
if (AddAddress(addr, 51 * 60))
|
||||
printf("IRC got new address: %s\n", addr.ToString().c_str());
|
||||
nGotIRCAddresses++;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("IRC decode failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
closesocket(hSocket);
|
||||
hSocket = INVALID_SOCKET;
|
||||
|
||||
// IRC usually blocks TOR, so only try once
|
||||
if (fTOR)
|
||||
return;
|
||||
|
||||
if (GetTime() - nStart > 20 * 60)
|
||||
{
|
||||
nErrorWait /= 3;
|
||||
nRetryWait /= 3;
|
||||
}
|
||||
|
||||
nRetryWait = nRetryWait * 11 / 10;
|
||||
if (!Wait(nRetryWait += 60))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef TEST
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
WSADATA wsadata;
|
||||
if (WSAStartup(MAKEWORD(2,2), &wsadata) != NO_ERROR)
|
||||
{
|
||||
printf("Error at WSAStartup()\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
ThreadIRCSeed(NULL);
|
||||
|
||||
WSACleanup();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -1,8 +1,13 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
bool RecvLine(SOCKET hSocket, string& strLine);
|
||||
void ThreadIRCSeed(void* parg);
|
||||
|
||||
extern int nGotIRCAddresses;
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
#ifndef BITCOIN_IRC_H
|
||||
#define BITCOIN_IRC_H
|
||||
|
||||
bool RecvLine(SOCKET hSocket, std::string& strLine);
|
||||
void ThreadIRCSeed(void* parg);
|
||||
|
||||
extern int nGotIRCAddresses;
|
||||
extern bool fGotExternalIP;
|
||||
|
||||
#endif
|
||||
@@ -1,24 +1,24 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2007 - 2009 John W. Wilkinson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2007 - 2009 John W. Wilkinson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,18 +1,18 @@
|
||||
#ifndef JSON_SPIRIT
|
||||
#define JSON_SPIRIT
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
#include "json_spirit_reader.h"
|
||||
#include "json_spirit_writer.h"
|
||||
#include "json_spirit_utils.h"
|
||||
|
||||
#endif
|
||||
#ifndef JSON_SPIRIT
|
||||
#define JSON_SPIRIT
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
#include "json_spirit_reader.h"
|
||||
#include "json_spirit_writer.h"
|
||||
#include "json_spirit_utils.h"
|
||||
|
||||
#endif
|
||||
@@ -1,54 +1,54 @@
|
||||
#ifndef JSON_SPIRIT_ERROR_POSITION
|
||||
#define JSON_SPIRIT_ERROR_POSITION
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
// An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
|
||||
// Note the "read_or_throw" functions are around 3 times slower than the standard functions "read"
|
||||
// functions that return a bool.
|
||||
//
|
||||
struct Error_position
|
||||
{
|
||||
Error_position();
|
||||
Error_position( unsigned int line, unsigned int column, const std::string& reason );
|
||||
bool operator==( const Error_position& lhs ) const;
|
||||
unsigned int line_;
|
||||
unsigned int column_;
|
||||
std::string reason_;
|
||||
};
|
||||
|
||||
inline Error_position::Error_position()
|
||||
: line_( 0 )
|
||||
, column_( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
|
||||
: line_( line )
|
||||
, column_( column )
|
||||
, reason_( reason )
|
||||
{
|
||||
}
|
||||
|
||||
inline bool Error_position::operator==( const Error_position& lhs ) const
|
||||
{
|
||||
if( this == &lhs ) return true;
|
||||
|
||||
return ( reason_ == lhs.reason_ ) &&
|
||||
( line_ == lhs.line_ ) &&
|
||||
( column_ == lhs.column_ );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef JSON_SPIRIT_ERROR_POSITION
|
||||
#define JSON_SPIRIT_ERROR_POSITION
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
// An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
|
||||
// Note the "read_or_throw" functions are around 3 times slower than the standard functions "read"
|
||||
// functions that return a bool.
|
||||
//
|
||||
struct Error_position
|
||||
{
|
||||
Error_position();
|
||||
Error_position( unsigned int line, unsigned int column, const std::string& reason );
|
||||
bool operator==( const Error_position& lhs ) const;
|
||||
unsigned int line_;
|
||||
unsigned int column_;
|
||||
std::string reason_;
|
||||
};
|
||||
|
||||
inline Error_position::Error_position()
|
||||
: line_( 0 )
|
||||
, column_( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
|
||||
: line_( line )
|
||||
, column_( column )
|
||||
, reason_( reason )
|
||||
{
|
||||
}
|
||||
|
||||
inline bool Error_position::operator==( const Error_position& lhs ) const
|
||||
{
|
||||
if( this == &lhs ) return true;
|
||||
|
||||
return ( reason_ == lhs.reason_ ) &&
|
||||
( line_ == lhs.line_ ) &&
|
||||
( column_ == lhs.column_ );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,137 +1,137 @@
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#include "json_spirit_reader.h"
|
||||
#include "json_spirit_reader_template.h"
|
||||
|
||||
using namespace json_spirit;
|
||||
|
||||
bool json_spirit::read( const std::string& s, Value& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::string& s, Value& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::istream& is, Value& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::istream& is, Value& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool json_spirit::read( const std::wstring& s, wValue& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wistream& is, wValue& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wistream& is, wValue& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool json_spirit::read( const std::string& s, mValue& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::string& s, mValue& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::istream& is, mValue& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::istream& is, mValue& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool json_spirit::read( const std::wstring& s, wmValue& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wistream& is, wmValue& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#endif
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#include "json_spirit_reader.h"
|
||||
#include "json_spirit_reader_template.h"
|
||||
|
||||
using namespace json_spirit;
|
||||
|
||||
bool json_spirit::read( const std::string& s, Value& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::string& s, Value& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::istream& is, Value& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::istream& is, Value& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool json_spirit::read( const std::wstring& s, wValue& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wistream& is, wValue& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wistream& is, wValue& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool json_spirit::read( const std::string& s, mValue& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::string& s, mValue& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::istream& is, mValue& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::istream& is, mValue& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool json_spirit::read( const std::wstring& s, wmValue& value )
|
||||
{
|
||||
return read_string( s, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
|
||||
{
|
||||
read_string_or_throw( s, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wistream& is, wmValue& value )
|
||||
{
|
||||
return read_stream( is, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
|
||||
{
|
||||
read_stream_or_throw( is, value );
|
||||
}
|
||||
|
||||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
|
||||
{
|
||||
return read_range( begin, end, value );
|
||||
}
|
||||
|
||||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
|
||||
{
|
||||
begin = read_range_or_throw( begin, end, value );
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,62 +1,62 @@
|
||||
#ifndef JSON_SPIRIT_READER
|
||||
#define JSON_SPIRIT_READER
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
#include "json_spirit_error_position.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
// functions to reads a JSON values
|
||||
|
||||
bool read( const std::string& s, Value& value );
|
||||
bool read( std::istream& is, Value& value );
|
||||
bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
|
||||
|
||||
void read_or_throw( const std::string& s, Value& value );
|
||||
void read_or_throw( std::istream& is, Value& value );
|
||||
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool read( const std::wstring& s, wValue& value );
|
||||
bool read( std::wistream& is, wValue& value );
|
||||
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
|
||||
|
||||
void read_or_throw( const std::wstring& s, wValue& value );
|
||||
void read_or_throw( std::wistream& is, wValue& value );
|
||||
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
|
||||
|
||||
#endif
|
||||
|
||||
bool read( const std::string& s, mValue& value );
|
||||
bool read( std::istream& is, mValue& value );
|
||||
bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
|
||||
|
||||
void read_or_throw( const std::string& s, mValue& value );
|
||||
void read_or_throw( std::istream& is, mValue& value );
|
||||
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool read( const std::wstring& s, wmValue& value );
|
||||
bool read( std::wistream& is, wmValue& value );
|
||||
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
|
||||
|
||||
void read_or_throw( const std::wstring& s, wmValue& value );
|
||||
void read_or_throw( std::wistream& is, wmValue& value );
|
||||
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef JSON_SPIRIT_READER
|
||||
#define JSON_SPIRIT_READER
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
#include "json_spirit_error_position.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
// functions to reads a JSON values
|
||||
|
||||
bool read( const std::string& s, Value& value );
|
||||
bool read( std::istream& is, Value& value );
|
||||
bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
|
||||
|
||||
void read_or_throw( const std::string& s, Value& value );
|
||||
void read_or_throw( std::istream& is, Value& value );
|
||||
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool read( const std::wstring& s, wValue& value );
|
||||
bool read( std::wistream& is, wValue& value );
|
||||
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
|
||||
|
||||
void read_or_throw( const std::wstring& s, wValue& value );
|
||||
void read_or_throw( std::wistream& is, wValue& value );
|
||||
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
|
||||
|
||||
#endif
|
||||
|
||||
bool read( const std::string& s, mValue& value );
|
||||
bool read( std::istream& is, mValue& value );
|
||||
bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
|
||||
|
||||
void read_or_throw( const std::string& s, mValue& value );
|
||||
void read_or_throw( std::istream& is, mValue& value );
|
||||
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
bool read( const std::wstring& s, wmValue& value );
|
||||
bool read( std::wistream& is, wmValue& value );
|
||||
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
|
||||
|
||||
void read_or_throw( const std::wstring& s, wmValue& value );
|
||||
void read_or_throw( std::wistream& is, wmValue& value );
|
||||
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,70 +1,70 @@
|
||||
#ifndef JSON_SPIRIT_READ_STREAM
|
||||
#define JSON_SPIRIT_READ_STREAM
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_reader_template.h"
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
// these classes allows you to read multiple top level contiguous values from a stream,
|
||||
// the normal stream read functions have a bug that prevent multiple top level values
|
||||
// from being read unless they are separated by spaces
|
||||
|
||||
template< class Istream_type, class Value_type >
|
||||
class Stream_reader
|
||||
{
|
||||
public:
|
||||
|
||||
Stream_reader( Istream_type& is )
|
||||
: iters_( is )
|
||||
{
|
||||
}
|
||||
|
||||
bool read_next( Value_type& value )
|
||||
{
|
||||
return read_range( iters_.begin_, iters_.end_, value );
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typedef Multi_pass_iters< Istream_type > Mp_iters;
|
||||
|
||||
Mp_iters iters_;
|
||||
};
|
||||
|
||||
template< class Istream_type, class Value_type >
|
||||
class Stream_reader_thrower
|
||||
{
|
||||
public:
|
||||
|
||||
Stream_reader_thrower( Istream_type& is )
|
||||
: iters_( is )
|
||||
, posn_begin_( iters_.begin_, iters_.end_ )
|
||||
, posn_end_( iters_.end_, iters_.end_ )
|
||||
{
|
||||
}
|
||||
|
||||
void read_next( Value_type& value )
|
||||
{
|
||||
posn_begin_ = read_range_or_throw( posn_begin_, posn_end_, value );
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typedef Multi_pass_iters< Istream_type > Mp_iters;
|
||||
typedef spirit_namespace::position_iterator< typename Mp_iters::Mp_iter > Posn_iter_t;
|
||||
|
||||
Mp_iters iters_;
|
||||
Posn_iter_t posn_begin_, posn_end_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef JSON_SPIRIT_READ_STREAM
|
||||
#define JSON_SPIRIT_READ_STREAM
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_reader_template.h"
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
// these classes allows you to read multiple top level contiguous values from a stream,
|
||||
// the normal stream read functions have a bug that prevent multiple top level values
|
||||
// from being read unless they are separated by spaces
|
||||
|
||||
template< class Istream_type, class Value_type >
|
||||
class Stream_reader
|
||||
{
|
||||
public:
|
||||
|
||||
Stream_reader( Istream_type& is )
|
||||
: iters_( is )
|
||||
{
|
||||
}
|
||||
|
||||
bool read_next( Value_type& value )
|
||||
{
|
||||
return read_range( iters_.begin_, iters_.end_, value );
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typedef Multi_pass_iters< Istream_type > Mp_iters;
|
||||
|
||||
Mp_iters iters_;
|
||||
};
|
||||
|
||||
template< class Istream_type, class Value_type >
|
||||
class Stream_reader_thrower
|
||||
{
|
||||
public:
|
||||
|
||||
Stream_reader_thrower( Istream_type& is )
|
||||
: iters_( is )
|
||||
, posn_begin_( iters_.begin_, iters_.end_ )
|
||||
, posn_end_( iters_.end_, iters_.end_ )
|
||||
{
|
||||
}
|
||||
|
||||
void read_next( Value_type& value )
|
||||
{
|
||||
posn_begin_ = read_range_or_throw( posn_begin_, posn_end_, value );
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typedef Multi_pass_iters< Istream_type > Mp_iters;
|
||||
typedef spirit_namespace::position_iterator< typename Mp_iters::Mp_iter > Posn_iter_t;
|
||||
|
||||
Mp_iters iters_;
|
||||
Posn_iter_t posn_begin_, posn_end_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,61 +1,61 @@
|
||||
#ifndef JSON_SPIRIT_UTILS
|
||||
#define JSON_SPIRIT_UTILS
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
#include <map>
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
template< class Obj_t, class Map_t >
|
||||
void obj_to_map( const Obj_t& obj, Map_t& mp_obj )
|
||||
{
|
||||
mp_obj.clear();
|
||||
|
||||
for( typename Obj_t::const_iterator i = obj.begin(); i != obj.end(); ++i )
|
||||
{
|
||||
mp_obj[ i->name_ ] = i->value_;
|
||||
}
|
||||
}
|
||||
|
||||
template< class Obj_t, class Map_t >
|
||||
void map_to_obj( const Map_t& mp_obj, Obj_t& obj )
|
||||
{
|
||||
obj.clear();
|
||||
|
||||
for( typename Map_t::const_iterator i = mp_obj.begin(); i != mp_obj.end(); ++i )
|
||||
{
|
||||
obj.push_back( typename Obj_t::value_type( i->first, i->second ) );
|
||||
}
|
||||
}
|
||||
|
||||
typedef std::map< std::string, Value > Mapped_obj;
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
typedef std::map< std::wstring, wValue > wMapped_obj;
|
||||
#endif
|
||||
|
||||
template< class Object_type, class String_type >
|
||||
const typename Object_type::value_type::Value_type& find_value( const Object_type& obj, const String_type& name )
|
||||
{
|
||||
for( typename Object_type::const_iterator i = obj.begin(); i != obj.end(); ++i )
|
||||
{
|
||||
if( i->name_ == name )
|
||||
{
|
||||
return i->value_;
|
||||
}
|
||||
}
|
||||
|
||||
return Object_type::value_type::Value_type::null;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef JSON_SPIRIT_UTILS
|
||||
#define JSON_SPIRIT_UTILS
|
||||
|
||||
// Copyright John W. Wilkinson 2007 - 2009.
|
||||
// Distributed under the MIT License, see accompanying file LICENSE.txt
|
||||
|
||||
// json spirit version 4.03
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
#include <map>
|
||||
|
||||
namespace json_spirit
|
||||
{
|
||||
template< class Obj_t, class Map_t >
|
||||
void obj_to_map( const Obj_t& obj, Map_t& mp_obj )
|
||||
{
|
||||
mp_obj.clear();
|
||||
|
||||
for( typename Obj_t::const_iterator i = obj.begin(); i != obj.end(); ++i )
|
||||
{
|
||||
mp_obj[ i->name_ ] = i->value_;
|
||||
}
|
||||
}
|
||||
|
||||
template< class Obj_t, class Map_t >
|
||||
void map_to_obj( const Map_t& mp_obj, Obj_t& obj )
|
||||
{
|
||||
obj.clear();
|
||||
|
||||
for( typename Map_t::const_iterator i = mp_obj.begin(); i != mp_obj.end(); ++i )
|
||||
{
|
||||
obj.push_back( typename Obj_t::value_type( i->first, i->second ) );
|
||||
}
|
||||
}
|
||||
|
||||
typedef std::map< std::string, Value > Mapped_obj;
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
typedef std::map< std::wstring, wValue > wMapped_obj;
|
||||
#endif
|
||||
|
||||
template< class Object_type, class String_type >
|
||||
const typename Object_type::value_type::Value_type& find_value( const Object_type& obj, const String_type& name )
|
||||
{
|
||||
for( typename Object_type::const_iterator i = obj.begin(); i != obj.end(); ++i )
|
||||
{
|
||||
if( i->name_ == name )
|
||||
{
|
||||
return i->value_;
|
||||
}
|
||||
}
|
||||
|
||||
return Object_type::value_type::Value_type::null;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,8 @@
|
||||
/* Copyright (c) 2007 John W Wilkinson
|
||||
|
||||
This source code can be used for any purpose as long as
|
||||
this comment is retained. */
|
||||
|
||||
// json spirit version 2.00
|
||||
|
||||
#include "json_spirit_value.h"
|
||||
/* Copyright (c) 2007 John W Wilkinson
|
||||
|
||||
This source code can be used for any purpose as long as
|
||||
this comment is retained. */
|
||||
|
||||
// json spirit version 2.00
|
||||
|
||||
#include "json_spirit_value.h"
|
||||