Compare commits
1135 Commits
2.5.0.0bet
...
2.5.0.0bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9700dbcc3f | ||
|
|
4e344458b2 | ||
|
|
6f95cc7296 | ||
|
|
cd66f8f57e | ||
|
|
83f0eb9a33 | ||
|
|
ca89bba768 | ||
|
|
2d2bd5013e | ||
|
|
b93d7bbf41 | ||
|
|
000277705a | ||
|
|
088712e784 | ||
|
|
117592387e | ||
|
|
76bb1a369c | ||
|
|
9331c281fe | ||
|
|
f2666316e1 | ||
|
|
7c2ff5067d | ||
|
|
5fed641c7c | ||
|
|
18bd62ee5a | ||
|
|
bc57e6e257 | ||
|
|
69b1aba218 | ||
|
|
df04d998c2 | ||
|
|
e986fe5f60 | ||
|
|
e4ac0ee258 | ||
|
|
426aa0e7da | ||
|
|
6c0a48af48 | ||
|
|
d865da1613 | ||
|
|
6fa4c1e06e | ||
|
|
52a6b3e046 | ||
|
|
fa26d2f938 | ||
|
|
4777cdc7ae | ||
|
|
cd8d3cbf6a | ||
|
|
e6a6feb5c0 | ||
|
|
98d6fb9214 | ||
|
|
94244cd15b | ||
|
|
c5e2ca9907 | ||
|
|
e4fef44caf | ||
|
|
5bd9da9bb1 | ||
|
|
5f0e899679 | ||
|
|
4b1806900b | ||
|
|
30e2912885 | ||
|
|
fc3608ff69 | ||
|
|
6de47ec9b2 | ||
|
|
f7253764a2 | ||
|
|
c54b134c31 | ||
|
|
a6bdca52be | ||
|
|
29eec05f8f | ||
|
|
250aef9738 | ||
|
|
50097914a2 | ||
|
|
ecff4fb2c5 | ||
|
|
ab3d17f352 | ||
|
|
a75d237e53 | ||
|
|
a0c7786e1b | ||
|
|
0d32c38c79 | ||
|
|
b846eda410 | ||
|
|
7c33c9ec02 | ||
|
|
74c08340a6 | ||
|
|
82161536be | ||
|
|
752dbca356 | ||
|
|
9ef56f6fd8 | ||
|
|
0239f115ae | ||
|
|
9775e09221 | ||
|
|
c975a1bfc0 | ||
|
|
c263536078 | ||
|
|
b559eeaad0 | ||
|
|
63373083ab | ||
|
|
bf525807b0 | ||
|
|
921021078b | ||
|
|
e5b60a8413 | ||
|
|
e01402f2fa | ||
|
|
27f92e1bb5 | ||
|
|
63db6de30b | ||
|
|
7a038126cf | ||
|
|
edcfa8cf7b | ||
|
|
c9594948a2 | ||
|
|
66988ecb66 | ||
|
|
186ca30be8 | ||
|
|
027d581dcc | ||
|
|
adcc1c745a | ||
|
|
8682856c01 | ||
|
|
9ec976d246 | ||
|
|
9d17b49586 | ||
|
|
698496d37c | ||
|
|
2af8c4f3c8 | ||
|
|
b164099b6d | ||
|
|
c19357605f | ||
|
|
5a08fa0088 | ||
|
|
bff87d16b1 | ||
|
|
5b0afa447c | ||
|
|
5a882a954f | ||
|
|
47f340d576 | ||
|
|
41df139c17 | ||
|
|
469c267161 | ||
|
|
f336d4fe58 | ||
|
|
e1d997cc91 | ||
|
|
53cf4bba1b | ||
|
|
030417dbe1 | ||
|
|
59abcb115c | ||
|
|
598dbd3794 | ||
|
|
2c4a7e5576 | ||
|
|
02429d5790 | ||
|
|
d990cb24ea | ||
|
|
e549b16dce | ||
|
|
e11864a64f | ||
|
|
a3e74f8ee5 | ||
|
|
36cb683404 | ||
|
|
f7f0028033 | ||
|
|
f06088fa12 | ||
|
|
b62ef8a2ed | ||
|
|
622ba65841 | ||
|
|
3a48d20d12 | ||
|
|
8d6db78f55 | ||
|
|
f3ba6e800a | ||
|
|
1c4aaf9807 | ||
|
|
c65ed41efd | ||
|
|
1965336077 | ||
|
|
9b7095ad4c | ||
|
|
33767c2bf9 | ||
|
|
82f7e861e7 | ||
|
|
846b5fa449 | ||
|
|
baf4e676eb | ||
|
|
a9bf3e83c4 | ||
|
|
710a1b0996 | ||
|
|
c4671b84a0 | ||
|
|
c0c98d0299 | ||
|
|
ffdec77d11 | ||
|
|
868bbe2e70 | ||
|
|
4aac655a5d | ||
|
|
510244aa70 | ||
|
|
50840b04b4 | ||
|
|
4d5962f5ca | ||
|
|
c9456c771c | ||
|
|
41a7a583d4 | ||
|
|
2e5220fa8a | ||
|
|
b75475d785 | ||
|
|
362ef06bb5 | ||
|
|
4a80c9f9f9 | ||
|
|
f1fdb9fc84 | ||
|
|
5bb9168c29 | ||
|
|
0245dcd8e8 | ||
|
|
b31bfa1d4f | ||
|
|
0778f22b68 | ||
|
|
4808696398 | ||
|
|
0ea7b5b25f | ||
|
|
995785de9f | ||
|
|
5deef427c0 | ||
|
|
024c6631d8 | ||
|
|
78354e4736 | ||
|
|
b9a792e6bd | ||
|
|
c533d21250 | ||
|
|
74572c8102 | ||
|
|
b8de64fab0 | ||
|
|
877b909205 | ||
|
|
1b1dcc0f45 | ||
|
|
94e5988794 | ||
|
|
b22333fda5 | ||
|
|
400c6bef78 | ||
|
|
edf6c2ff07 | ||
|
|
5eec1a276c | ||
|
|
f707fd7649 | ||
|
|
75b028daf3 | ||
|
|
c6f259d18f | ||
|
|
954d522341 | ||
|
|
1f8d17d27e | ||
|
|
c2781af38d | ||
|
|
a1cd2683d4 | ||
|
|
6d671f53c2 | ||
|
|
4efb81f597 | ||
|
|
faddeb6e2d | ||
|
|
e36629968d | ||
|
|
0b756797f6 | ||
|
|
110c7bbbc7 | ||
|
|
639c6dc4ac | ||
|
|
f605d36adf | ||
|
|
f6d6c134f4 | ||
|
|
a0c07654df | ||
|
|
03ab688abe | ||
|
|
4a28802b02 | ||
|
|
18f8fe7cc3 | ||
|
|
459606f5d5 | ||
|
|
3d53c31680 | ||
|
|
173dd5b59b | ||
|
|
8536de3555 | ||
|
|
722ba5c34d | ||
|
|
3ccfd7226b | ||
|
|
578da7bae5 | ||
|
|
6916389657 | ||
|
|
da4f41732a | ||
|
|
0414adf5de | ||
|
|
d9b2942f66 | ||
|
|
cbe7907b07 | ||
|
|
b737501d4d | ||
|
|
c303ffafb5 | ||
|
|
6f513b4920 | ||
|
|
a83c60583f | ||
|
|
cde8950257 | ||
|
|
0b4dd1e909 | ||
|
|
28e2600271 | ||
|
|
53cc4f74c8 | ||
|
|
3989ca3ad1 | ||
|
|
977782a9f7 | ||
|
|
f100dda20b | ||
|
|
9c0a140a17 | ||
|
|
b4bcaf54ad | ||
|
|
82c0ca0f3c | ||
|
|
bfbd81e3ee | ||
|
|
67fecf3fef | ||
|
|
c65d96802e | ||
|
|
64af8ddc2e | ||
|
|
732f472146 | ||
|
|
6dc46604a4 | ||
|
|
f0c3071de1 | ||
|
|
b250ad2f8b | ||
|
|
69390a81ab | ||
|
|
c398b92eb1 | ||
|
|
3018206e2f | ||
|
|
811d0f2534 | ||
|
|
2b33d785ac | ||
|
|
c7a8322c5d | ||
|
|
37e722847a | ||
|
|
4aa8d892a4 | ||
|
|
e164062cf3 | ||
|
|
935d3e1c4b | ||
|
|
17eadcee2b | ||
|
|
5ffbe0e9ee | ||
|
|
4c3da45141 | ||
|
|
c516ef7c28 | ||
|
|
dcf654cf0a | ||
|
|
23f2e5decc | ||
|
|
ddbf03bc91 | ||
|
|
94070ea5e0 | ||
|
|
725d39626f | ||
|
|
25655abbbb | ||
|
|
60bee79bc5 | ||
|
|
8f9d278d2f | ||
|
|
dc120135b1 | ||
|
|
d2f56e7472 | ||
|
|
3877e1aa22 | ||
|
|
e08e5eca3a | ||
|
|
7321cc067f | ||
|
|
43f14e1474 | ||
|
|
ced6a77819 | ||
|
|
bca777a97e | ||
|
|
5b98129da9 | ||
|
|
dc37ab74c1 | ||
|
|
ee76a35728 | ||
|
|
e31ea8c916 | ||
|
|
41561cb7b6 | ||
|
|
0c8fdca6f3 | ||
|
|
a50626dafb | ||
|
|
ca55081437 | ||
|
|
5cd66d074e | ||
|
|
9529e3a7ba | ||
|
|
d3e2668d85 | ||
|
|
b3b2bb90e1 | ||
|
|
9c597665bf | ||
|
|
a845436af4 | ||
|
|
cabd487fa5 | ||
|
|
9c7c43e7da | ||
|
|
0c421c4906 | ||
|
|
4df8880b0d | ||
|
|
45046ee01a | ||
|
|
2ff6522b60 | ||
|
|
ee8c589ea3 | ||
|
|
b31d40dbb6 | ||
|
|
970b966bcb | ||
|
|
6f1dc14bdc | ||
|
|
949e6f247d | ||
|
|
77a848cf0e | ||
|
|
21e268b8c2 | ||
|
|
580c761fa0 | ||
|
|
e13b12550c | ||
|
|
05dc421ea8 | ||
|
|
423957d023 | ||
|
|
c3b584973b | ||
|
|
74e1805970 | ||
|
|
e2743e2c61 | ||
|
|
59f0b90c72 | ||
|
|
c962096fd5 | ||
|
|
d9aa9f6cb3 | ||
|
|
874e422dbc | ||
|
|
63c825c056 | ||
|
|
b507fa2a09 | ||
|
|
eb2040edbd | ||
|
|
02ba1dabe7 | ||
|
|
03494d78a5 | ||
|
|
b598945903 | ||
|
|
8bf017e14e | ||
|
|
00e4d77503 | ||
|
|
e6efdadb6f | ||
|
|
02a8e7ea75 | ||
|
|
dc9b7591a0 | ||
|
|
7ae0d329e1 | ||
|
|
bff9ec86ff | ||
|
|
f445fbca3d | ||
|
|
9079ce30a0 | ||
|
|
2202f718b9 | ||
|
|
63b80634c2 | ||
|
|
9bbfeaba72 | ||
|
|
2d640dbe62 | ||
|
|
2ce3fc3bd6 | ||
|
|
009710f854 | ||
|
|
7eeff1b50a | ||
|
|
6f736d6415 | ||
|
|
3dc988dd08 | ||
|
|
ca292fbb85 | ||
|
|
53a3fe83cb | ||
|
|
d667940157 | ||
|
|
404fb9b39f | ||
|
|
d1c4bdb8eb | ||
|
|
7b67e4e811 | ||
|
|
2b387c8613 | ||
|
|
c7f6cb6747 | ||
|
|
5e5dc58482 | ||
|
|
80d0510b86 | ||
|
|
fcd3f7c3fe | ||
|
|
38abb9ca49 | ||
|
|
c47834f470 | ||
|
|
b899212d14 | ||
|
|
5a11e47653 | ||
|
|
d0faf0f1b6 | ||
|
|
27de6b456b | ||
|
|
92f6684ca9 | ||
|
|
59c45f5627 | ||
|
|
35c2075f73 | ||
|
|
4b659248f7 | ||
|
|
3d01e09198 | ||
|
|
a7805d9d4c | ||
|
|
2439c0e7cd | ||
|
|
67f99a4430 | ||
|
|
0a8c7700dc | ||
|
|
68ca17a0da | ||
|
|
dcc7c4d39e | ||
|
|
06fcbf8995 | ||
|
|
a939d06f77 | ||
|
|
11e342ae19 | ||
|
|
5ac40d13a5 | ||
|
|
1dea366cec | ||
|
|
7e5ae5a8af | ||
|
|
4e430b2fd4 | ||
|
|
d61c345630 | ||
|
|
0c7aa3fad2 | ||
|
|
8de7e4a326 | ||
|
|
4fd5d72d97 | ||
|
|
d08d2552aa | ||
|
|
6b6968cbbe | ||
|
|
49157a38ae | ||
|
|
402a0d3e43 | ||
|
|
5cd8cbd514 | ||
|
|
32537e85a2 | ||
|
|
d937ca85a2 | ||
|
|
6a5ed7f460 | ||
|
|
a158e96ba6 | ||
|
|
7ad43dbed7 | ||
|
|
63f261f169 | ||
|
|
f36849e815 | ||
|
|
b0bc0f9d85 | ||
|
|
cd271e6f04 | ||
|
|
d6bac74e1b | ||
|
|
eda7fa0fe7 | ||
|
|
191e0cc654 | ||
|
|
cc35a1e8aa | ||
|
|
7dfe85450d | ||
|
|
e8b341c69f | ||
|
|
77c397e0d1 | ||
|
|
15794f09c3 | ||
|
|
cdf8baeb10 | ||
|
|
e4b550afc1 | ||
|
|
49bb34b742 | ||
|
|
ab01d01fce | ||
|
|
4905c262ba | ||
|
|
ce05bb467e | ||
|
|
8f0fe89579 | ||
|
|
23bd6e20a4 | ||
|
|
3f0071ac58 | ||
|
|
776660923b | ||
|
|
32f170f644 | ||
|
|
93222990b5 | ||
|
|
8890296beb | ||
|
|
9907af8135 | ||
|
|
17ec357c1b | ||
|
|
575e967627 | ||
|
|
0b53e84761 | ||
|
|
fadf78aabd | ||
|
|
47fce14d16 | ||
|
|
149b6fbcd4 | ||
|
|
e649be230e | ||
|
|
6ba45c3d87 | ||
|
|
0e701189a3 | ||
|
|
af316607e1 | ||
|
|
548039c66f | ||
|
|
e75a2502d1 | ||
|
|
6be2148951 | ||
|
|
f149688da6 | ||
|
|
8f77e5874e | ||
|
|
eabd2d3e4c | ||
|
|
e460a4fe4f | ||
|
|
9e79da0efc | ||
|
|
6851d4a1d3 | ||
|
|
5705d367ed | ||
|
|
d1f88112ce | ||
|
|
eba1dbc8fa | ||
|
|
dcb819b087 | ||
|
|
25ced826c4 | ||
|
|
5a30c3219e | ||
|
|
6a5ac3729d | ||
|
|
31326224ac | ||
|
|
811a44574a | ||
|
|
6782442d8e | ||
|
|
a376d2f286 | ||
|
|
ce3e1c86bc | ||
|
|
20f7675135 | ||
|
|
dad3edee5e | ||
|
|
1bfdae53c6 | ||
|
|
e5902b9cf6 | ||
|
|
88829ca91a | ||
|
|
4bdf99b2f4 | ||
|
|
54883bb043 | ||
|
|
6db55b5eaa | ||
|
|
821dc6df63 | ||
|
|
8de86e26d6 | ||
|
|
1cf8b1fc7d | ||
|
|
f469fa224e | ||
|
|
56912ddaf7 | ||
|
|
620b1b4f02 | ||
|
|
2208c67b62 | ||
|
|
6f6b53ff73 | ||
|
|
529197fb7d | ||
|
|
953e63f55d | ||
|
|
783cbc634e | ||
|
|
9ac25b0d74 | ||
|
|
5f051ed2a9 | ||
|
|
b40d2f3b9a | ||
|
|
3f90276ce0 | ||
|
|
66e077f8f1 | ||
|
|
8426b1d91f | ||
|
|
3b55937085 | ||
|
|
da86a971b5 | ||
|
|
ff7f0e0a60 | ||
|
|
9233b610c2 | ||
|
|
9dc183b9b7 | ||
|
|
d000b6f884 | ||
|
|
e0b0dd134f | ||
|
|
e3d09bff36 | ||
|
|
5e901812ad | ||
|
|
b7f9ff8c98 | ||
|
|
76ed603bf1 | ||
|
|
337816b7f2 | ||
|
|
37b1566535 | ||
|
|
9864d1e62d | ||
|
|
e3a07377e3 | ||
|
|
f54b908dbb | ||
|
|
e3f3a5faf7 | ||
|
|
2046e15f65 | ||
|
|
4e8f554ae6 | ||
|
|
0f21040888 | ||
|
|
0d86fa0d95 | ||
|
|
0ad8826b51 | ||
|
|
a535f123ff | ||
|
|
4fcb2de2bb | ||
|
|
8885192db1 | ||
|
|
7ebf64939b | ||
|
|
6712b0927d | ||
|
|
8853bb7618 | ||
|
|
cbc8ec9880 | ||
|
|
6372099cb2 | ||
|
|
15fa114742 | ||
|
|
c16ded1377 | ||
|
|
8ecd0e0eb1 | ||
|
|
c5895ed61b | ||
|
|
35751844b0 | ||
|
|
fd66e9acb8 | ||
|
|
310ae58388 | ||
|
|
d4a31567cd | ||
|
|
d54abf66fe | ||
|
|
792b3b7a81 | ||
|
|
0345606903 | ||
|
|
06aec23c8a | ||
|
|
71a77250d0 | ||
|
|
af32ef24db | ||
|
|
214dca1d4e | ||
|
|
af8ca15e29 | ||
|
|
ac71aec39d | ||
|
|
9b7b363b49 | ||
|
|
948b54dc58 | ||
|
|
20553713a8 | ||
|
|
1424001ffd | ||
|
|
fa1c49aaf2 | ||
|
|
316369f117 | ||
|
|
2253d3c2cc | ||
|
|
b09bf68b7c | ||
|
|
526111af98 | ||
|
|
5942a33f42 | ||
|
|
62b077c4b2 | ||
|
|
89996f09f1 | ||
|
|
4b760c6361 | ||
|
|
293b7e3a05 | ||
|
|
12686ecb83 | ||
|
|
456912b134 | ||
|
|
88ac2ecf98 | ||
|
|
227cb078a5 | ||
|
|
a17582bf6d | ||
|
|
e8ba5dc6e2 | ||
|
|
f37d3324e6 | ||
|
|
fcb06c8c22 | ||
|
|
d8bdf4500a | ||
|
|
69ea4d5414 | ||
|
|
7e9f99e5c8 | ||
|
|
95541d99c4 | ||
|
|
05ca7e6d69 | ||
|
|
644a4a4886 | ||
|
|
7eb82ddbea | ||
|
|
e721d4ca9e | ||
|
|
c72582b679 | ||
|
|
217f0a82b5 | ||
|
|
1efd172b42 | ||
|
|
e8d0d03ad9 | ||
|
|
6cb97de793 | ||
|
|
77dbdc235a | ||
|
|
a9c87ea2b8 | ||
|
|
232829526c | ||
|
|
b5d8b2f14c | ||
|
|
c2673a627c | ||
|
|
bb49256188 | ||
|
|
1b6a284dd6 | ||
|
|
36b35b907e | ||
|
|
f61b310ff2 | ||
|
|
c1e84b3bf1 | ||
|
|
9971d27ef3 | ||
|
|
3c0835f725 | ||
|
|
023aba2b60 | ||
|
|
abc0a14dda | ||
|
|
dc23c6a445 | ||
|
|
161a0ffc59 | ||
|
|
b96436c906 | ||
|
|
cee7419208 | ||
|
|
9ff6e7a080 | ||
|
|
9112a568d9 | ||
|
|
8d0c9bc894 | ||
|
|
e7b4e4501e | ||
|
|
df80084822 | ||
|
|
4df2891b1a | ||
|
|
d0560677fa | ||
|
|
9130a3851f | ||
|
|
bb3fb26847 | ||
|
|
8406264138 | ||
|
|
e51f48ebe0 | ||
|
|
a0a2aa4c5d | ||
|
|
65cea7b5ec | ||
|
|
fb589419de | ||
|
|
ae9844d5a1 | ||
|
|
645ea21581 | ||
|
|
60fd675dff | ||
|
|
48903da446 | ||
|
|
5399df134c | ||
|
|
a858040ace | ||
|
|
d792b7d5ae | ||
|
|
8b3ed1a7dc | ||
|
|
47004857ea | ||
|
|
82a6b8d7ef | ||
|
|
a30bcf1fa7 | ||
|
|
febe978fa1 | ||
|
|
1eeefcf495 | ||
|
|
ff6b0eee6c | ||
|
|
a7c8eaa937 | ||
|
|
55545e31e8 | ||
|
|
34132c6da7 | ||
|
|
fbafa99a3b | ||
|
|
bd63805611 | ||
|
|
ae8398a434 | ||
|
|
0b9318de88 | ||
|
|
55e4bbf9db | ||
|
|
f33a572751 | ||
|
|
2849cedbd8 | ||
|
|
041d1b29d1 | ||
|
|
cdcdc2fee1 | ||
|
|
8e35d5bc8d | ||
|
|
f12e368707 | ||
|
|
f01895c7a7 | ||
|
|
4ce0c067e1 | ||
|
|
728a2cbfae | ||
|
|
a4aab3b933 | ||
|
|
11ee0d6544 | ||
|
|
2b80dad47c | ||
|
|
7bb13ec1c2 | ||
|
|
344010d2bb | ||
|
|
ef37ecddc6 | ||
|
|
91a38e205e | ||
|
|
bd4de382e4 | ||
|
|
623244c3bd | ||
|
|
7a06ff6dec | ||
|
|
6d735e24ff | ||
|
|
5c30d544fa | ||
|
|
54a3876288 | ||
|
|
57f71afb98 | ||
|
|
d8ec198f6f | ||
|
|
faa6d7c9f6 | ||
|
|
d79a5b17a5 | ||
|
|
34deea5d32 | ||
|
|
edc7324c1d | ||
|
|
b9190e8254 | ||
|
|
534878ae99 | ||
|
|
99bfd21ecc | ||
|
|
cb5c324c9d | ||
|
|
55dc504f26 | ||
|
|
ecb0138c90 | ||
|
|
0860eeb87f | ||
|
|
f08bff61cf | ||
|
|
432aca6465 | ||
|
|
7cdb8db146 | ||
|
|
6ba9dedcb8 | ||
|
|
6d603608f4 | ||
|
|
64f4d9fb84 | ||
|
|
60ccc450ae | ||
|
|
ddb5f327a3 | ||
|
|
df90ea42eb | ||
|
|
a062d648b3 | ||
|
|
a59ae820b5 | ||
|
|
228831acdd | ||
|
|
bf15ee43da | ||
|
|
608f45677c | ||
|
|
1cb15f214b | ||
|
|
cd4a9e9b03 | ||
|
|
d6eae56d4f | ||
|
|
b5a87a63dc | ||
|
|
1eb17c4f34 | ||
|
|
8a6ce1f711 | ||
|
|
0f22f8af45 | ||
|
|
b2e81e6fd9 | ||
|
|
f82eab942d | ||
|
|
aa29aec40f | ||
|
|
181def52ab | ||
|
|
96d2bd63cc | ||
|
|
194021a957 | ||
|
|
9e307f94ea | ||
|
|
155b2de138 | ||
|
|
c76c3fd2be | ||
|
|
01c5554944 | ||
|
|
542cf65b41 | ||
|
|
f037561a67 | ||
|
|
379263a6d3 | ||
|
|
c420ca01f6 | ||
|
|
a1f9db6eee | ||
|
|
c9212174c4 | ||
|
|
0065336377 | ||
|
|
4f9625a3e1 | ||
|
|
7688ebd29b | ||
|
|
3f2a7f1eb3 | ||
|
|
b3d067d0c8 | ||
|
|
a3b4ad5ac1 | ||
|
|
e3b329d27f | ||
|
|
7d10c43822 | ||
|
|
fcb0d45d39 | ||
|
|
5492db0223 | ||
|
|
2207b05f5f | ||
|
|
f15a0c2591 | ||
|
|
92fb22129c | ||
|
|
ccca9c4400 | ||
|
|
0597cb4416 | ||
|
|
0602174e50 | ||
|
|
6fddc92ce7 | ||
|
|
aa30df6454 | ||
|
|
f6c61ab407 | ||
|
|
2ab81ed77c | ||
|
|
0ade035f43 | ||
|
|
73b62035d8 | ||
|
|
28837db308 | ||
|
|
85befef260 | ||
|
|
e7bbb47422 | ||
|
|
846bc7edb1 | ||
|
|
99a9842a1f | ||
|
|
33009138c3 | ||
|
|
c74b82ebd8 | ||
|
|
49ea92a4a5 | ||
|
|
6cc4eeaa30 | ||
|
|
1b89f79888 | ||
|
|
07d99de3ea | ||
|
|
ae757affa1 | ||
|
|
482b6296fc | ||
|
|
d37ce729f0 | ||
|
|
e92ce232bc | ||
|
|
78ae44b160 | ||
|
|
49ce87a8e0 | ||
|
|
d2fe5ce884 | ||
|
|
5e695756de | ||
|
|
0506a75417 | ||
|
|
34e1316144 | ||
|
|
18dffa6c75 | ||
|
|
03621c378e | ||
|
|
aff9312419 | ||
|
|
4651b1be96 | ||
|
|
32497a22d2 | ||
|
|
3b5ef56c16 | ||
|
|
d4cc3a58d8 | ||
|
|
afedbb38b2 | ||
|
|
fe70bf3877 | ||
|
|
f14ee6cf1c | ||
|
|
1791b15f85 | ||
|
|
6c5b3b3a0d | ||
|
|
6ea2287679 | ||
|
|
cad4ec22b4 | ||
|
|
f277983caf | ||
|
|
5e561e5321 | ||
|
|
ef83dbcae2 | ||
|
|
ab6c69adcb | ||
|
|
1c90747476 | ||
|
|
c3b3d8482c | ||
|
|
86b4d92599 | ||
|
|
1f6786b1f8 | ||
|
|
4cd2b153f4 | ||
|
|
27b0810688 | ||
|
|
94c72a4cf6 | ||
|
|
e634116e71 | ||
|
|
9021cb5bc8 | ||
|
|
3674900a54 | ||
|
|
9855ae79c3 | ||
|
|
fe1a4985f1 | ||
|
|
015a368a1d | ||
|
|
07f59e071d | ||
|
|
670e2bfe33 | ||
|
|
992b6382a3 | ||
|
|
c3ac550c93 | ||
|
|
acba7fc5de | ||
|
|
ccb500fdf4 | ||
|
|
44111507e7 | ||
|
|
5f14596ed2 | ||
|
|
4ad65c8f4a | ||
|
|
b4b215fe30 | ||
|
|
d8a8005d70 | ||
|
|
37ca15b77c | ||
|
|
6c18fe5591 | ||
|
|
fdcb05467c | ||
|
|
ef8db46ae7 | ||
|
|
14f56c77e8 | ||
|
|
44e21084e4 | ||
|
|
b7f1275789 | ||
|
|
b1be05db4d | ||
|
|
09c776fd7e | ||
|
|
e8a24790a5 | ||
|
|
8b3be79266 | ||
|
|
e5f0572c1c | ||
|
|
68df3bc6c3 | ||
|
|
a3da960c26 | ||
|
|
d9490f9840 | ||
|
|
3b24f9d821 | ||
|
|
bf35897e92 | ||
|
|
977705b42d | ||
|
|
459bc40515 | ||
|
|
eb8ca9355c | ||
|
|
31f7b0d5be | ||
|
|
7c54946c4b | ||
|
|
5aaf2c222a | ||
|
|
9424feefce | ||
|
|
a3917ccab6 | ||
|
|
5286a60142 | ||
|
|
d4459de49b | ||
|
|
05dba6668c | ||
|
|
c15a1c6eaa | ||
|
|
fe8c962f73 | ||
|
|
4192cf2403 | ||
|
|
1817f1aa9e | ||
|
|
afacf352ed | ||
|
|
d3ebbba2a1 | ||
|
|
460edf1745 | ||
|
|
dacb19d412 | ||
|
|
fe8158db85 | ||
|
|
a36e4fbcd0 | ||
|
|
9442c7ef07 | ||
|
|
d4a0b59eb1 | ||
|
|
07600949ab | ||
|
|
7efaad1818 | ||
|
|
e32b0d1c25 | ||
|
|
0fdcc29aa2 | ||
|
|
37bedbffc9 | ||
|
|
46505150c4 | ||
|
|
e18c5c90cc | ||
|
|
1f5649d9d2 | ||
|
|
7bbd55a9fd | ||
|
|
92eeccf84e | ||
|
|
7bcc289518 | ||
|
|
507f758c0d | ||
|
|
6afffb7245 | ||
|
|
c62f4ae0b3 | ||
|
|
ee80c614e0 | ||
|
|
fea7af6910 | ||
|
|
c72aa0e97d | ||
|
|
3dd60b5392 | ||
|
|
a357267552 | ||
|
|
1badeb2eef | ||
|
|
0bb8d2a417 | ||
|
|
4a215db83c | ||
|
|
512e55a170 | ||
|
|
1ebe8dc022 | ||
|
|
cafeabdbc3 | ||
|
|
b342b26409 | ||
|
|
938c3a07af | ||
|
|
16288f98f7 | ||
|
|
a932156e85 | ||
|
|
64e9b9fb6d | ||
|
|
7af28550da | ||
|
|
60e2d786dd | ||
|
|
ec08f3430d | ||
|
|
a50aa0fb95 | ||
|
|
cf026e8eaa | ||
|
|
77614d0c4a | ||
|
|
e8d71039d7 | ||
|
|
4164b5bd37 | ||
|
|
3c66ec82b5 | ||
|
|
b796c16877 | ||
|
|
42d34d8f0c | ||
|
|
5fbb37df82 | ||
|
|
52e12d7cbd | ||
|
|
5cf5719e8e | ||
|
|
af3a80143e | ||
|
|
90db27c3fe | ||
|
|
3d584b76f7 | ||
|
|
fbf3dec421 | ||
|
|
1d36683128 | ||
|
|
cefc546c0a | ||
|
|
7aeb51813c | ||
|
|
d6fc29ec79 | ||
|
|
9af182e0c3 | ||
|
|
c7120b997f | ||
|
|
e61571fcec | ||
|
|
9a900b32b2 | ||
|
|
1033dd78b0 | ||
|
|
4aaae3f59e | ||
|
|
1424633a58 | ||
|
|
c9b98094e5 | ||
|
|
5707026985 | ||
|
|
bfcfb842fb | ||
|
|
8fe2230891 | ||
|
|
41cc0b1a5a | ||
|
|
cc8c525dab | ||
|
|
92bc3c2838 | ||
|
|
1d065e7bc5 | ||
|
|
fb1b90a281 | ||
|
|
268f716104 | ||
|
|
b7328875f1 | ||
|
|
02ee58efa7 | ||
|
|
6754881847 | ||
|
|
6e4c5d8c26 | ||
|
|
544648c2eb | ||
|
|
e62f8bf56b | ||
|
|
7f5138b08b | ||
|
|
a367aeaf12 | ||
|
|
fc6453beba | ||
|
|
8a981b7a79 | ||
|
|
d7f9a02699 | ||
|
|
7c9153ea04 | ||
|
|
2c16fe3335 | ||
|
|
eb14d27ca5 | ||
|
|
7024178069 | ||
|
|
c85ce3e0e8 | ||
|
|
067c5ff1cf | ||
|
|
429bd99f1c | ||
|
|
7b5bb0fd97 | ||
|
|
ae50f424d3 | ||
|
|
53cc1ad673 | ||
|
|
ceb80c6cac | ||
|
|
71bd3ab780 | ||
|
|
8a40a4b3ae | ||
|
|
7772db17ae | ||
|
|
11738d807c | ||
|
|
80b9a8fa50 | ||
|
|
d619f6581e | ||
|
|
697e9aa923 | ||
|
|
15c843fbb9 | ||
|
|
b6b7e61cfb | ||
|
|
d5b0ee9371 | ||
|
|
e86807c3d3 | ||
|
|
08fcb119a9 | ||
|
|
edff33afd1 | ||
|
|
bdfa963bed | ||
|
|
4eff247865 | ||
|
|
3e3d5bd7d8 | ||
|
|
5a74d1be8f | ||
|
|
812eccfe0e | ||
|
|
d00c337382 | ||
|
|
54dbcc95ab | ||
|
|
2e5ddd80ff | ||
|
|
2c44a4d760 | ||
|
|
f8561222d5 | ||
|
|
2c8e3e9c8e | ||
|
|
ccbc6c07ed | ||
|
|
47e820e3d8 | ||
|
|
13dea4b567 | ||
|
|
70d1ce715e | ||
|
|
cc41545c0a | ||
|
|
aded8fab0a | ||
|
|
9cb4d28ad8 | ||
|
|
a1b2235fb3 | ||
|
|
161923c808 | ||
|
|
d5a03424d0 | ||
|
|
3e87c1ab9d | ||
|
|
a6046bc49a | ||
|
|
db98f4b30c | ||
|
|
60eff63569 | ||
|
|
b8e97ec53b | ||
|
|
c2b60b2268 | ||
|
|
cac1f923cc | ||
|
|
b4ac0ef21f | ||
|
|
8b85c22f25 | ||
|
|
582faab29d | ||
|
|
a9f6fa3441 | ||
|
|
54740c1ba2 | ||
|
|
94a8ecbdf1 | ||
|
|
46855e0b70 | ||
|
|
2d3eabe07e | ||
|
|
48bda000e9 | ||
|
|
8aea6fa2da | ||
|
|
c46aa0e5c8 | ||
|
|
ed7f6e4b68 | ||
|
|
825d88014d | ||
|
|
b3ff38fb35 | ||
|
|
1ebba9d8be | ||
|
|
1e4deb2182 | ||
|
|
d5acd04a19 | ||
|
|
fe73a951e3 | ||
|
|
415094154d | ||
|
|
347522b9a6 | ||
|
|
918f563faa | ||
|
|
3b88b0fea6 | ||
|
|
d8e3d52f21 | ||
|
|
041f3eb568 | ||
|
|
4a1d97a622 | ||
|
|
cd0d712f56 | ||
|
|
761d9a1883 | ||
|
|
2c9a6d7c26 | ||
|
|
8105f89088 | ||
|
|
90084ed2f7 | ||
|
|
496725a8fd | ||
|
|
72b0cdf0d7 | ||
|
|
a266d307a6 | ||
|
|
f7fe414597 | ||
|
|
5c1e9bd94f | ||
|
|
747135afae | ||
|
|
675efe3ab8 | ||
|
|
02b6191e66 | ||
|
|
1e07d6a28d | ||
|
|
ab98f03ebf | ||
|
|
4aff5e3a06 | ||
|
|
3ad4e8efe7 | ||
|
|
d04d7737c3 | ||
|
|
8de52cb51e | ||
|
|
c8cb79726b | ||
|
|
d51a227c1d | ||
|
|
94ed03ce35 | ||
|
|
304a5e946d | ||
|
|
ff64b53580 | ||
|
|
9ece794f9a | ||
|
|
b67dc22f10 | ||
|
|
8a1a29caa8 | ||
|
|
a8d07c3e82 | ||
|
|
937135bb36 | ||
|
|
10c32266c2 | ||
|
|
ad45369442 | ||
|
|
1ca770fa72 | ||
|
|
4acd11d2b2 | ||
|
|
38c264e38d | ||
|
|
8da6b882fc | ||
|
|
6e03c2ebfc | ||
|
|
a5cb5ed896 | ||
|
|
32bef7b099 | ||
|
|
af0359132e | ||
|
|
85990879de | ||
|
|
9436a4c3a5 | ||
|
|
efc786e318 | ||
|
|
ed299b35e9 | ||
|
|
0defe9401f | ||
|
|
b66678f028 | ||
|
|
b0cfd4292f | ||
|
|
8e390685cd | ||
|
|
9bcacdca4a | ||
|
|
c1969402f1 | ||
|
|
50bf22a4c7 | ||
|
|
cf93044d3f | ||
|
|
33404add38 | ||
|
|
49ba74c38f | ||
|
|
3ed5db9819 | ||
|
|
4535204d1e | ||
|
|
18c656a555 | ||
|
|
42c28b5b95 | ||
|
|
9fc47fdf05 | ||
|
|
9ef34599ce | ||
|
|
bd3e5c6917 | ||
|
|
7e9bed1e53 | ||
|
|
ff2215929c | ||
|
|
36d53e9788 | ||
|
|
6b9db7d40d | ||
|
|
30f805f5a9 | ||
|
|
64448ef218 | ||
|
|
6e312e0420 | ||
|
|
1f7b86d34f | ||
|
|
ae00fd5782 | ||
|
|
62f6f02467 | ||
|
|
55ee89314f | ||
|
|
b2f985aa03 | ||
|
|
b3a34c0138 | ||
|
|
1f06b09d38 | ||
|
|
758914a80a | ||
|
|
f2566abdcd | ||
|
|
cb6d479350 | ||
|
|
846930a4f9 | ||
|
|
e788d89b18 | ||
|
|
07f68cfe2f | ||
|
|
1c6ef51925 | ||
|
|
9995bc4d9f | ||
|
|
accb931831 | ||
|
|
42ac83c814 | ||
|
|
9ee9063c4d | ||
|
|
8c38b361ea | ||
|
|
cb919b2de5 | ||
|
|
679ea7c58f | ||
|
|
21ebbd25f8 | ||
|
|
3c232ac5b6 | ||
|
|
d36d2408d7 | ||
|
|
9fd59f850c | ||
|
|
4cc7d1e74d | ||
|
|
66f4353c3e | ||
|
|
0acc83b066 | ||
|
|
943d7ca6b9 | ||
|
|
65d1c7376b | ||
|
|
871a624313 | ||
|
|
8cf515120f | ||
|
|
30c5db92e6 | ||
|
|
19ebc40bdb | ||
|
|
4db2e6baf9 | ||
|
|
a9c1369cbf | ||
|
|
dd478d7cd4 | ||
|
|
53e7cc7f72 | ||
|
|
e5d3a0a931 | ||
|
|
23e6b12326 | ||
|
|
2cc530cbec | ||
|
|
b540cde623 | ||
|
|
5a54955941 | ||
|
|
9ffffdceca | ||
|
|
257d0ff315 | ||
|
|
a935b0a089 | ||
|
|
0236bddffd | ||
|
|
384966641a | ||
|
|
3be9c9161c | ||
|
|
a445533ffc | ||
|
|
e073b21544 | ||
|
|
7e746bb01c | ||
|
|
2d8e902a2a | ||
|
|
bb10892b76 | ||
|
|
bdfa5ae707 | ||
|
|
2091b04a11 | ||
|
|
f367c098ec | ||
|
|
98631d37ae | ||
|
|
d504ab7924 | ||
|
|
4fc8c74530 | ||
|
|
4876623f86 | ||
|
|
d5b752e4c0 | ||
|
|
a1ecc5b399 | ||
|
|
306e8b17b2 | ||
|
|
f66500f535 | ||
|
|
b92ef7cb1a | ||
|
|
b30c2656e8 | ||
|
|
0899c7fc5a | ||
|
|
800d0eb04d | ||
|
|
b09bc52b51 | ||
|
|
657c810c1f | ||
|
|
c501d6bdc6 | ||
|
|
f13c595bf9 | ||
|
|
60e2209281 | ||
|
|
24eeff1d61 | ||
|
|
c94291f6e1 | ||
|
|
6faee3cef9 | ||
|
|
bb4e067394 | ||
|
|
81503c6934 | ||
|
|
8858a5cdca | ||
|
|
d994fbafcf | ||
|
|
c3954faa3e | ||
|
|
0650a6f7db | ||
|
|
0ddd08bf6d | ||
|
|
a1720c1c79 | ||
|
|
cd9f82696a | ||
|
|
242427d348 | ||
|
|
3f1ab3623d | ||
|
|
7068b4b4b3 | ||
|
|
7c81685aa6 | ||
|
|
f7fc7984e2 | ||
|
|
b2ef29d131 | ||
|
|
d5dcf697f6 | ||
|
|
9731247f2e | ||
|
|
c2654cd65c | ||
|
|
e032540c0b | ||
|
|
6dda7d1e64 | ||
|
|
f67df77dff | ||
|
|
ecdadaf0bc | ||
|
|
25fb85a5ef | ||
|
|
31426268ea | ||
|
|
f0b5b1bcb5 | ||
|
|
1f2ebf0825 | ||
|
|
fa0afbe947 | ||
|
|
70967a4234 | ||
|
|
87c9aeeb12 | ||
|
|
0a386c3985 | ||
|
|
bfcd4b9f00 | ||
|
|
3d6082a5d9 | ||
|
|
aceeb581d4 | ||
|
|
d46a6a2ea8 | ||
|
|
c1bf96ac5f | ||
|
|
a1bf5f1e70 | ||
|
|
7155e25c1e | ||
|
|
5c4d2e607a | ||
|
|
79750c5320 | ||
|
|
bb353bc9d6 | ||
|
|
5818762aaf | ||
|
|
e5467bc54b | ||
|
|
e574fba0a5 | ||
|
|
82b59662f3 | ||
|
|
260ce95509 | ||
|
|
23df28cb25 | ||
|
|
a68960a30f | ||
|
|
f295aac206 | ||
|
|
d568604117 | ||
|
|
795d6fa334 | ||
|
|
d788d16020 | ||
|
|
c8db1f7c5c | ||
|
|
ac67ff9f21 | ||
|
|
3a71f635f0 | ||
|
|
a9e12cb518 | ||
|
|
b0aac43d6c | ||
|
|
f0d7249679 | ||
|
|
32fb536a92 | ||
|
|
8f8361a176 | ||
|
|
06056128e5 | ||
|
|
259c31b94c | ||
|
|
ffffeb9e85 | ||
|
|
ebe8c90238 | ||
|
|
25f657e665 | ||
|
|
ffd40a5419 | ||
|
|
8f8b265d97 | ||
|
|
d20eef0922 |
2
.gitignore
vendored
@@ -71,7 +71,9 @@ app/app.iml
|
||||
# Art
|
||||
art/screen*.png
|
||||
art/logo_512.png
|
||||
art/store_screens/
|
||||
|
||||
# Dir linux
|
||||
.directory
|
||||
*/.directory
|
||||
.idea
|
||||
|
||||
22
.idea/compiler.xml
generated
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
<entry name="!?*.aj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
3
.idea/copyright/profiles_settings.xml
generated
@@ -1,3 +0,0 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
||||
6
.idea/encodings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
20
.idea/gradle.xml
generated
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.14.1" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
11
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,11 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AndroidLintAppCompatResource" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintMissingTranslation" enabled="true" level="INFO" enabled_by_default="true" />
|
||||
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
|
||||
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
7
.idea/inspectionProfiles/profiles_settings.xml
generated
@@ -1,7 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
49
.idea/misc.xml
generated
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>1.7</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
||||
9
.idea/modules.xml
generated
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/KeePassDX.iml" filepath="$PROJECT_DIR$/KeePassDX.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/runConfigurations.xml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
147
CHANGELOG
@@ -1,3 +1,150 @@
|
||||
KeepassDX (2.5.0.0beta23)
|
||||
* New, more secure database creation workflow
|
||||
* Recognize more database files
|
||||
* Add alias for history files (WARNING: history is erased)
|
||||
* New Biometric unlock (Fingerprint with new API)
|
||||
* Fix entry references
|
||||
* Fix OOM with KeyFile
|
||||
* Fix small issues
|
||||
|
||||
KeepassDX (2.5.0.0beta22)
|
||||
* Rebuild code for actions
|
||||
* Add UUID as entry view
|
||||
* Fix bug with natural order
|
||||
* Fix number of entries in databaseV1
|
||||
* New entry views
|
||||
|
||||
KeepassDX (2.5.0.0beta21)
|
||||
* Fix nested groups no longer visible in V1 databases
|
||||
* Improved data import algorithm for V1 databases
|
||||
* Add natural database sort
|
||||
* Add username database sort
|
||||
* Fix button disabled with only KeyFile
|
||||
* Show the number of entries in a group
|
||||
|
||||
KeepassDX (2.5.0.0beta20)
|
||||
* Fix a major bug that displays an entry history
|
||||
|
||||
KeepassDX (2.5.0.0beta19)
|
||||
* Add lock button always visible
|
||||
* New connection workflow
|
||||
* Code refactored in Kotlin
|
||||
* Better notification implementation
|
||||
* Better views for large screen
|
||||
* Magikeyboard enhancement
|
||||
* Fix Recycle Bin
|
||||
* Fix memory when load database
|
||||
* Fix small bugs
|
||||
|
||||
KeepassDX (2.5.0.0beta18)
|
||||
* New recent databases views
|
||||
* New information dialog
|
||||
* Custom fields for the Magikeyboard
|
||||
* Timeout for the Magikeyboard
|
||||
* Long press for keyboard selection
|
||||
* Fix memory when opening the database
|
||||
* Memory management for attachments
|
||||
|
||||
KeepassDX (2.5.0.0beta17)
|
||||
* Fix font and search
|
||||
|
||||
KeepassDX (2.5.0.0beta16)
|
||||
* New search in a single fragment
|
||||
* Search suggestions
|
||||
* Added the display of usernames
|
||||
* Added translations
|
||||
* Fix read-only mode
|
||||
* Fix parcelable / toolbar / back
|
||||
|
||||
KeepassDX (2.5.0.0beta15)
|
||||
* Read only mode
|
||||
* Best group recovery for the navigation fragment
|
||||
* Fix copies in notifications
|
||||
* Fix orientation
|
||||
* Added translations
|
||||
|
||||
KeepassDX (2.5.0.0beta14)
|
||||
* Optimize all the memory with parcelables / fix search
|
||||
|
||||
KeepassDX (2.5.0.0beta13)
|
||||
* Fix memory issue with parcelable (crash in beta12 version)
|
||||
|
||||
KeepassDX (2.5.0.0beta12)
|
||||
* Added the Magikeyboard to fill the forms (settings still in development)
|
||||
* Added move and copy for groups and entries
|
||||
* New navigation in a single screen / new animations between activities
|
||||
* New icons for the material pack / vectorization
|
||||
* New adaptive launcher icon
|
||||
* Icons depends now of setting of list items
|
||||
* Added a setting to disable the open button when no password is identified
|
||||
* Added a setting to disable the education screens
|
||||
* Added a setting to disable the copy of protected custom fields
|
||||
* Fix the fingerprint recognition (WARNING : The keystore is reinit, you must delete the old keys)
|
||||
* Fix small bugs
|
||||
|
||||
KeepassDX (2.5.0.0beta11)
|
||||
* Fix crash in beta10 version
|
||||
|
||||
KeepassDX (2.5.0.0beta10)
|
||||
* Dynamically change Algorithm and Key Derivation Function in settings
|
||||
* Upgrade translations
|
||||
* New red volcano theme, fix classic dark theme
|
||||
* Add Material Icon Pack to the Free version
|
||||
* Update fingerprint state with checkbox
|
||||
* Fix bugs
|
||||
|
||||
KeepassDX (2.5.0.0beta9)
|
||||
* Education Screens to learn how to use the app
|
||||
* New designs
|
||||
* New custom font for character visibility
|
||||
* New themes
|
||||
* New icon pack
|
||||
* Change setting organisation
|
||||
* Pro version
|
||||
|
||||
KeepassDX (2.5.0.0beta8)
|
||||
* Hide custom entries protected
|
||||
* Best management of field references (https://keepass.info/help/base/fieldrefs.html)
|
||||
* Change database / default settings
|
||||
* Add Autofill for search
|
||||
* Add sorting by last access and by creation time
|
||||
* Rebuild custom entries
|
||||
* Refactor old code
|
||||
* Fix bugs
|
||||
|
||||
KeepassDX (2.5.0.0beta7)
|
||||
* Rebuild Notifications
|
||||
* Change links to https
|
||||
* Add extended Ascii (ñæËÌÂÝÜ...)
|
||||
* Upgrade custom visibility font
|
||||
* Best fingerprint error management
|
||||
* Add setting to prevent the password copy
|
||||
* Fix bugs
|
||||
|
||||
KeepassDX (2.5.0.0beta6)
|
||||
* Fix crash
|
||||
|
||||
KeepassDX (2.5.0.0beta5)
|
||||
* Autofill (Android O)
|
||||
* Deletion for group
|
||||
* New sorts with (Asc/Dsc, Groups before or after)
|
||||
* Better permission management with dialog at runtime
|
||||
* Setting to change font of field (monospace for a better visibility)
|
||||
* Open kdbx and kdb files from file browser
|
||||
* Change sort of fields
|
||||
* Hide empty fields
|
||||
* Add copy button for Username / Password and extra field
|
||||
* Add 5, 10, 20 seconds and 15 minutes of clipboard timeout
|
||||
* Hide "show password" icon when password not present
|
||||
* New animations for add button
|
||||
* New list to add and delete node with animation
|
||||
* Change view for better cohesion
|
||||
* Upgrade translations
|
||||
* Fix crash for API < Kitkat
|
||||
* Fix fingerprint bugs
|
||||
* Fix many small bugs
|
||||
* Add recycle bin setting (not yet accessible)
|
||||
|
||||
KeepassDX (2.5.0.0beta4)
|
||||
* Show only file name
|
||||
* Setting for full path
|
||||
|
||||
339
COPYING.gpl-2.0
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
16
LICENSE
@@ -1,7 +1,19 @@
|
||||
---
|
||||
|
||||
The KeePass icon was created by Jeremy JAMET and is licensed under the terms of GPLv3.
|
||||
KeePass DX is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The KeePass DX icon was created by Jeremy JAMET and is licensed under the terms of GPLv3.
|
||||
|
||||
---
|
||||
|
||||
@@ -54,7 +66,7 @@ Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft <contact@kunzisoft.com>.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
|
||||
396
LICENSES/LICENSE-FONT-AWESOME
Normal file
@@ -0,0 +1,396 @@
|
||||
Attribution 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution 4.0 International Public License ("Public License"). To the
|
||||
extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of
|
||||
these terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the
|
||||
Licensed Material available under these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
93
LICENSES/LICENSE_FONT_FIRA_MONO_REGULAR.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
69
ReadMe.md
@@ -1,42 +1,49 @@
|
||||
# Android Keepass DX
|
||||
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/logo.png"> Keepass DX is a material design Keepass Client for manage keys and passwords in crypt database for your android device.
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/icon.png"> Keepass DX is a **multi-format KeePass manager for Android devices**. The application allows to create keys and passwords in a secure way by integrating with the Android design standards.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/screen.jpg" width="220">
|
||||
|
||||
### Features
|
||||
|
||||
- Simplified creation of the database file
|
||||
- Create entries and groups
|
||||
- Open database, copy username / password, open URI / URL
|
||||
- Fingerprint for fast unlocking
|
||||
- Material design with themes
|
||||
- Device integration and AutoFill (In progress)
|
||||
* Create database files / entries and groups
|
||||
* Support for **.kdb** and **.kdbx** files (version 1 to 4) with AES - Twofish - ChaCha20 - Argon2 algorithm
|
||||
* **Compatible** with the majority of alternative programs (KeePass, KeePassX, KeePass XC...)
|
||||
* Allows **fast copy** of fields and opening of URI / URL
|
||||
* **Fingerprint** for fast unlocking
|
||||
* Material design with **themes**
|
||||
* **AutoFill** and Integration
|
||||
* Field filling **keyboard**
|
||||
* Precise management of **settings**
|
||||
* Code written in **native language** *(Kotlin / Java / JNI / C)*
|
||||
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/screen1.jpg" width="220">
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/screen2.jpg" width="220">
|
||||
Keepass DX is **open source** and **ad-free**.
|
||||
|
||||
## What is KeePass?
|
||||
## What is KeePass DX?
|
||||
|
||||
Today you need to remember many passwords. You need a password for the Windows network logon, your e-mail account, your website's FTP password, online passwords (like website member account), etc. etc. etc. The list is endless. Also, you should use different passwords for each account. Because if you use only one password everywhere and someone gets this password you have a problem... A serious problem. The thief would have access to your e-mail account, website, etc. Unimaginable.
|
||||
Today you need to remember many passwords. You need a password for your e-mail account, your website's FTP password, online passwords (like website member account), etc. etc. etc. The list is endless. Also, you **should use different passwords for each account**. Because if you use only one password everywhere and someone gets this password you have a problem... A serious problem. The thief would have access to your e-mail account, website, etc. Unimaginable.
|
||||
|
||||
KeePass is a free open source password manager, which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key file. So you only have to remember one single master password or select the key file to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish). For more information, see the features page.
|
||||
KeePass DX is a **free open source password manager for Android**, which helps you to **manage your passwords in a secure way**. You can put all your passwords in one database, which is locked with one **master key** or a **key file**. So you **only have to remember one single master password or select the key file** to unlock the whole database. The databases are encrypted using the best and **most secure encryption algorithms** currently known.
|
||||
|
||||
## Is it really free?
|
||||
|
||||
Yes, KeePass is really free, and more than that: it is open source (OSI certified). You can have a look at its full source and check whether the encryption algorithms are implemented correctly.
|
||||
Yes, KeePass DX is under **free license (OSI certified)** and **without advertising**. You can have a look at its full source and check whether the encryption algorithms are implemented correctly.
|
||||
|
||||
## Donation
|
||||
*Note : If you access the application from a store, visual features may not be available to incentivize the contribution to the work of open source projects. These optional visuals are accessible after a donation (and a small congratulation message :) or the purchase of an extended version, but do not worry, the main features remain completely free. If you contribute to the project and you do not have access to the themes, do not hesitate to contact me at [contact@kunzisoft.com](contact@kunzisoft.com), I will give you the procedure.*
|
||||
|
||||
Even if the application is free, to maintain the application, you can make donations.
|
||||
## Contributions
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KM6QMDAXZM3UU "Kunzisoft Paypal Donation")
|
||||
You can contribute in different ways to help us on our work.
|
||||
|
||||
[](https://liberapay.com/Kunzisoft/donate "Kunzisoft Liberapay Donation")
|
||||
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/screen4.jpg" width="220">
|
||||
<img src="https://raw.githubusercontent.com/Kunzisoft/KeePassDX/master/art/screen5.jpg" width="220">
|
||||
* Add features by a **[pull request](https://help.github.com/articles/about-pull-requests/)**.
|
||||
* Help to **[translate](https://hosted.weblate.org/projects/keepass-dx/strings/)** into your language (By using [Weblate](https://hosted.weblate.org/projects/keepass-dx/) or with a manual [pull request](https://help.github.com/articles/about-pull-requests/))
|
||||
* **[Donate](https://www.kunzisoft.com/donation)** 人◕ ‿‿ ◕人Y for a better service and a quick development of your features.
|
||||
* Buy the **[Pro version](https://play.google.com/store/apps/details?id=com.kunzisoft.keepass.pro)** of KeePass DX
|
||||
|
||||
## Download
|
||||
|
||||
*We recommend the installation from [F-Droid](https://f-droid.org/en/packages/com.kunzisoft.keepass.libre/) which verifies that all libraries and application code are open source.*
|
||||
|
||||
[<img src="https://f-droid.org/badge/get-it-on.png"
|
||||
alt="Get it on F-Droid"
|
||||
height="80">](https://f-droid.org/en/packages/com.kunzisoft.keepass.libre/)
|
||||
@@ -44,26 +51,26 @@ Even if the application is free, to maintain the application, you can make donat
|
||||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"
|
||||
alt="Get it on Google Play"
|
||||
height="80">](https://play.google.com/store/apps/details?id=com.kunzisoft.keepass.free)
|
||||
|
||||
## F.A.Q.
|
||||
|
||||
### JNI
|
||||
Other questions? You can read the [F.A.Q.](https://www.keepassdx.com/FAQ)
|
||||
|
||||
## Other devices
|
||||
|
||||
Native library build instructions:
|
||||
1. Make sure you have the latest MIPS Android NDK installed:
|
||||
https://developer.android.com/tools/sdk/ndk/index.html
|
||||
2. From KeePassDroid/app/src/main/jni, call prep_build.sh to download and unpack the crypto sources.
|
||||
3. The standard gradle files build everything now.
|
||||
- [KeePass XC](https://keepassxc.org/) (https://keepassxc.org/) works with **GNU/Linux**, **Mac** and **Windows**, is updated regularly and under the terms of the GNU General Public License. This is the recommended version for computers.
|
||||
|
||||
This project is a fork of [KeepassDroid](https://github.com/bpellin/keepassdroid) by bpellin.
|
||||
- [KeePass](https://keepass.info/) (https://keepass.info/) is the historical project, with good technical documentation for standardized database files but only running on **Windows**.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2017 Jeremy Jamet / Kunzisoft.
|
||||
Copyright (c) 2019 Jeremy Jamet / [Kunzisoft](https://www.kunzisoft.com).
|
||||
|
||||
This file is part of KeePass DX.
|
||||
|
||||
KeePass DX is free software: you can redistribute it and/or modify
|
||||
[KeePass DX](https://www.keepassdx.com) is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
KeePass DX is distributed in the hope that it will be useful,
|
||||
@@ -73,3 +80,5 @@ This project is a fork of [KeepassDroid](https://github.com/bpellin/keepassdroid
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*This project is a fork of [KeepassDroid](https://github.com/bpellin/keepassdroid) by bpellin.*
|
||||
|
||||
1
app/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
.cxx
|
||||
.externalNativeBuild
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion = 25
|
||||
buildToolsVersion = "27.0.1"
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion '28.0.3'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.kunzisoft.keepass"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 25
|
||||
versionCode = 4
|
||||
versionName = "2.5.0.0beta4"
|
||||
targetSdkVersion 28
|
||||
versionCode = 23
|
||||
versionName = "2.5.0.0beta23"
|
||||
multiDexEnabled true
|
||||
|
||||
testApplicationId = "com.keepassdroid.tests"
|
||||
testApplicationId = "com.kunzisoft.keepass.tests"
|
||||
testInstrumentationRunner = "android.test.InstrumentationTestRunner"
|
||||
|
||||
ndk {
|
||||
abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a',
|
||||
'arm64-v8a', 'mips', 'mips64'
|
||||
}
|
||||
buildConfigField "String[]", "ICON_PACKS", "{\"classic\",\"material\"}"
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
@@ -41,38 +42,73 @@ android {
|
||||
productFlavors {
|
||||
libre {
|
||||
applicationIdSuffix = ".libre"
|
||||
versionNameSuffix "-libre"
|
||||
buildConfigField "String", "BUILD_VERSION", "\"libre\""
|
||||
buildConfigField "boolean", "FULL_VERSION", "true"
|
||||
buildConfigField "boolean", "GOOGLE_PLAY_VERSION", "false"
|
||||
buildConfigField "boolean", "CLOSED_STORE", "false"
|
||||
buildConfigField "String[]", "STYLES_DISABLED", "{\"KeepassDXStyle_Dark\",\"KeepassDXStyle_Red\",\"KeepassDXStyle_Purple\"}"
|
||||
buildConfigField "String[]", "ICON_PACKS_DISABLED", "{}"
|
||||
|
||||
}
|
||||
pro_google {
|
||||
pro {
|
||||
applicationIdSuffix = ".pro"
|
||||
versionNameSuffix "-pro"
|
||||
buildConfigField "String", "BUILD_VERSION", "\"pro\""
|
||||
buildConfigField "boolean", "FULL_VERSION", "true"
|
||||
buildConfigField "boolean", "GOOGLE_PLAY_VERSION", "true"
|
||||
buildConfigField "boolean", "CLOSED_STORE", "true"
|
||||
buildConfigField "String[]", "STYLES_DISABLED", "{}"
|
||||
buildConfigField "String[]", "ICON_PACKS_DISABLED", "{}"
|
||||
}
|
||||
free_google {
|
||||
free {
|
||||
applicationIdSuffix = ".free"
|
||||
versionNameSuffix "-free"
|
||||
buildConfigField "String", "BUILD_VERSION", "\"free\""
|
||||
buildConfigField "boolean", "FULL_VERSION", "false"
|
||||
buildConfigField "boolean", "GOOGLE_PLAY_VERSION", "true"
|
||||
buildConfigField "boolean", "CLOSED_STORE", "true"
|
||||
buildConfigField "String[]", "STYLES_DISABLED", "{\"KeepassDXStyle_Dark\",\"KeepassDXStyle_Blue\",\"KeepassDXStyle_Red\",\"KeepassDXStyle_Purple\"}"
|
||||
buildConfigField "String[]", "ICON_PACKS_DISABLED", "{}"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
libre.res.srcDir 'src/libre/res'
|
||||
pro.res.srcDir 'src/pro/res'
|
||||
free.res.srcDir 'src/free/res'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
def supportVersion = "25.4.0"
|
||||
def spongycastleVersion = "1.58.0.0"
|
||||
def room_version = "2.1.0"
|
||||
|
||||
dependencies {
|
||||
androidTestCompile "junit:junit:4.12"
|
||||
compile "com.android.support:appcompat-v7:$supportVersion"
|
||||
compile "com.android.support:design:$supportVersion"
|
||||
compile "com.android.support:preference-v7:$supportVersion"
|
||||
compile "com.android.support:preference-v14:$supportVersion"
|
||||
compile "com.android.support:cardview-v7:$supportVersion"
|
||||
compile "com.madgag.spongycastle:core:$spongycastleVersion"
|
||||
compile "com.madgag.spongycastle:prov:$spongycastleVersion"
|
||||
compile "joda-time:joda-time:2.9.9"
|
||||
compile "org.sufficientlysecure:html-textview:3.5"
|
||||
compile "com.nononsenseapps:filepicker:4.1.0"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.biometric:biometric:1.0.0-beta01'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
kapt "androidx.room:room-compiler:$room_version"
|
||||
|
||||
implementation "com.madgag.spongycastle:core:$spongycastleVersion"
|
||||
implementation "com.madgag.spongycastle:prov:$spongycastleVersion"
|
||||
// Expandable view
|
||||
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
|
||||
// Time
|
||||
implementation 'joda-time:joda-time:2.9.9'
|
||||
// Education
|
||||
implementation 'com.getkeepsafe.taptargetview:taptargetview:1.12.0'
|
||||
// Apache Commons Collections
|
||||
implementation 'commons-collections:commons-collections:3.2.1'
|
||||
implementation 'org.apache.commons:commons-io:1.3.2'
|
||||
// Base64
|
||||
implementation 'biz.source_code:base64coder:2010-12-19'
|
||||
// Icon pack
|
||||
implementation project(path: ':icon-pack-classic')
|
||||
implementation project(path: ':icon-pack-material')
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.tests.database.TestData;
|
||||
|
||||
public class AccentTest extends AndroidTestCase {
|
||||
|
||||
private static final String KEYFILE = "";
|
||||
private static final String PASSWORD = "é";
|
||||
private static final String ASSET = "accent.kdb";
|
||||
private static final String FILENAME = "/sdcard/accent.kdb";
|
||||
|
||||
public void testOpen() {
|
||||
|
||||
try {
|
||||
TestData.GetDb(getContext(), ASSET, PASSWORD, KEYFILE, FILENAME);
|
||||
} catch (Exception e) {
|
||||
assertTrue("Failed to open database", false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.database.PwDate;
|
||||
|
||||
public class PwDateTest extends TestCase {
|
||||
public void testDate() {
|
||||
PwDate jDate = new PwDate(System.currentTimeMillis());
|
||||
|
||||
PwDate intermediate = (PwDate) jDate.clone();
|
||||
|
||||
PwDate cDate = new PwDate(intermediate.getCDate(), 0);
|
||||
|
||||
assertTrue("jDate and intermediate not equal", jDate.equals(intermediate));
|
||||
assertTrue("jDate and cDate not equal", cDate.equals(jDate));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Calendar;
|
||||
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.database.PwEntryV3;
|
||||
import com.keepassdroid.tests.database.TestData;
|
||||
|
||||
public class PwEntryTestV3 extends AndroidTestCase {
|
||||
PwEntryV3 mPE;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
mPE = (PwEntryV3) TestData.GetTest1(getContext()).entries.get(0);
|
||||
|
||||
}
|
||||
|
||||
public void testName() {
|
||||
assertTrue("Name was " + mPE.title, mPE.title.equals("Amazon"));
|
||||
}
|
||||
|
||||
public void testPassword() throws UnsupportedEncodingException {
|
||||
String sPass = "12345";
|
||||
byte[] password = sPass.getBytes("UTF-8");
|
||||
|
||||
assertArrayEquals(password, mPE.getPasswordBytes());
|
||||
}
|
||||
|
||||
public void testCreation() {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(mPE.tCreation.getJDate());
|
||||
|
||||
assertEquals("Incorrect year.", cal.get(Calendar.YEAR), 2009);
|
||||
assertEquals("Incorrect month.", cal.get(Calendar.MONTH), 3);
|
||||
assertEquals("Incorrect day.", cal.get(Calendar.DAY_OF_MONTH), 23);
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.database.PwEntryV4;
|
||||
import com.keepassdroid.database.PwGroupV4;
|
||||
import com.keepassdroid.database.PwIconCustom;
|
||||
import com.keepassdroid.database.PwIconStandard;
|
||||
import com.keepassdroid.database.security.ProtectedBinary;
|
||||
import com.keepassdroid.database.security.ProtectedString;
|
||||
|
||||
public class PwEntryTestV4 extends TestCase {
|
||||
public void testAssign() {
|
||||
PwEntryV4 entry = new PwEntryV4();
|
||||
|
||||
entry.additional = "test223";
|
||||
|
||||
entry.autoType = entry.new AutoType();
|
||||
entry.autoType.defaultSequence = "1324";
|
||||
entry.autoType.enabled = true;
|
||||
entry.autoType.obfuscationOptions = 123412432109L;
|
||||
entry.autoType.put("key", "value");
|
||||
|
||||
entry.backgroupColor = "blue";
|
||||
entry.binaries.put("key1", new ProtectedBinary(false, new byte[] {0,1}));
|
||||
entry.customIcon = new PwIconCustom(UUID.randomUUID(), new byte[0]);
|
||||
entry.foregroundColor = "red";
|
||||
entry.history.add(new PwEntryV4());
|
||||
entry.icon = new PwIconStandard(5);
|
||||
entry.overrideURL = "override";
|
||||
entry.parent = new PwGroupV4();
|
||||
entry.strings.put("key2", new ProtectedString(false, "value2"));
|
||||
entry.url = "http://localhost";
|
||||
entry.uuid = UUID.randomUUID();
|
||||
|
||||
PwEntryV4 target = new PwEntryV4();
|
||||
target.assign(entry);
|
||||
|
||||
/* This test is not so useful now that I am not implementing value equality for Entries
|
||||
assertTrue("Entries do not match.", entry.equals(target));
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.database.PwGroupV3;
|
||||
import com.keepassdroid.tests.database.TestData;
|
||||
|
||||
public class PwGroupTest extends AndroidTestCase {
|
||||
|
||||
PwGroupV3 mPG;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
mPG = (PwGroupV3) TestData.GetTest1(getContext()).getGroups().get(0);
|
||||
|
||||
}
|
||||
|
||||
public void testGroupName() {
|
||||
assertTrue("Name was " + mPG.name, mPG.name.equals("Internet"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import com.keepassdroid.utils.EmptyUtils;
|
||||
import com.keepassdroid.utils.UriUtil;
|
||||
|
||||
public class TestUtil {
|
||||
private static final File sdcard = Environment.getExternalStorageDirectory();
|
||||
|
||||
public static void extractKey(Context ctx, String asset, String target) throws Exception {
|
||||
|
||||
InputStream key = ctx.getAssets().open(asset, AssetManager.ACCESS_STREAMING);
|
||||
|
||||
FileOutputStream keyFile = new FileOutputStream(target);
|
||||
while (true) {
|
||||
byte[] buf = new byte[1024];
|
||||
int read = key.read(buf);
|
||||
if ( read == -1 ) {
|
||||
break;
|
||||
} else {
|
||||
keyFile.write(buf, 0, read);
|
||||
}
|
||||
}
|
||||
|
||||
keyFile.close();
|
||||
|
||||
}
|
||||
|
||||
public static InputStream getKeyFileInputStream(Context ctx, String keyfile) throws FileNotFoundException {
|
||||
InputStream keyIs = null;
|
||||
if (!EmptyUtils.isNullOrEmpty(keyfile)) {
|
||||
Uri uri = UriUtil.parseDefaultFile(keyfile);
|
||||
keyIs = UriUtil.getUriInputStream(ctx, uri);
|
||||
}
|
||||
|
||||
return keyIs;
|
||||
}
|
||||
|
||||
public static String getSdPath(String filename) {
|
||||
File file = new File(sdcard, filename);
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.database.PwDate;
|
||||
import com.keepassdroid.stream.LEDataInputStream;
|
||||
import com.keepassdroid.stream.LEDataOutputStream;
|
||||
import com.keepassdroid.utils.Types;
|
||||
|
||||
public class TypesTest extends TestCase {
|
||||
|
||||
public void testReadWriteLongZero() {
|
||||
testReadWriteLong((byte) 0);
|
||||
}
|
||||
|
||||
public void testReadWriteLongMax() {
|
||||
testReadWriteLong(Byte.MAX_VALUE);
|
||||
}
|
||||
|
||||
public void testReadWriteLongMin() {
|
||||
testReadWriteLong(Byte.MIN_VALUE);
|
||||
}
|
||||
|
||||
public void testReadWriteLongRnd() {
|
||||
Random rnd = new Random();
|
||||
byte[] buf = new byte[1];
|
||||
rnd.nextBytes(buf);
|
||||
|
||||
testReadWriteLong(buf[0]);
|
||||
}
|
||||
|
||||
private void testReadWriteLong(byte value) {
|
||||
byte[] orig = new byte[8];
|
||||
byte[] dest = new byte[8];
|
||||
|
||||
setArray(orig, value, 0, 8);
|
||||
|
||||
long one = LEDataInputStream.readLong(orig, 0);
|
||||
LEDataOutputStream.writeLong(one, dest, 0);
|
||||
|
||||
assertArrayEquals(orig, dest);
|
||||
|
||||
}
|
||||
|
||||
public void testReadWriteIntZero() {
|
||||
testReadWriteInt((byte) 0);
|
||||
}
|
||||
|
||||
public void testReadWriteIntMin() {
|
||||
testReadWriteInt(Byte.MIN_VALUE);
|
||||
}
|
||||
|
||||
public void testReadWriteIntMax() {
|
||||
testReadWriteInt(Byte.MAX_VALUE);
|
||||
}
|
||||
|
||||
private void testReadWriteInt(byte value) {
|
||||
byte[] orig = new byte[4];
|
||||
byte[] dest = new byte[4];
|
||||
|
||||
for (int i = 0; i < 4; i++ ) {
|
||||
orig[i] = 0;
|
||||
}
|
||||
|
||||
setArray(orig, value, 0, 4);
|
||||
|
||||
int one = LEDataInputStream.readInt(orig, 0);
|
||||
|
||||
LEDataOutputStream.writeInt(one, dest, 0);
|
||||
|
||||
assertArrayEquals(orig, dest);
|
||||
|
||||
}
|
||||
|
||||
private void setArray(byte[] buf, byte value, int offset, int size) {
|
||||
for (int i = offset; i < offset + size; i++) {
|
||||
buf[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void testReadWriteShortOne() {
|
||||
byte[] orig = new byte[2];
|
||||
byte[] dest = new byte[2];
|
||||
|
||||
orig[0] = 0;
|
||||
orig[1] = 1;
|
||||
|
||||
int one = LEDataInputStream.readUShort(orig, 0);
|
||||
dest = LEDataOutputStream.writeUShortBuf(one);
|
||||
|
||||
assertArrayEquals(orig, dest);
|
||||
|
||||
}
|
||||
|
||||
public void testReadWriteShortMin() {
|
||||
testReadWriteShort(Byte.MIN_VALUE);
|
||||
}
|
||||
|
||||
public void testReadWriteShortMax() {
|
||||
testReadWriteShort(Byte.MAX_VALUE);
|
||||
}
|
||||
|
||||
private void testReadWriteShort(byte value) {
|
||||
byte[] orig = new byte[2];
|
||||
byte[] dest = new byte[2];
|
||||
|
||||
setArray(orig, value, 0, 2);
|
||||
|
||||
int one = LEDataInputStream.readUShort(orig, 0);
|
||||
LEDataOutputStream.writeUShort(one, dest, 0);
|
||||
|
||||
assertArrayEquals(orig, dest);
|
||||
|
||||
}
|
||||
|
||||
public void testReadWriteByteZero() {
|
||||
testReadWriteByte((byte) 0);
|
||||
}
|
||||
|
||||
public void testReadWriteByteMin() {
|
||||
testReadWriteByte(Byte.MIN_VALUE);
|
||||
}
|
||||
|
||||
public void testReadWriteByteMax() {
|
||||
testReadWriteShort(Byte.MAX_VALUE);
|
||||
}
|
||||
|
||||
private void testReadWriteByte(byte value) {
|
||||
byte[] orig = new byte[1];
|
||||
byte[] dest = new byte[1];
|
||||
|
||||
setArray(orig, value, 0, 1);
|
||||
|
||||
int one = Types.readUByte(orig, 0);
|
||||
Types.writeUByte(one, dest, 0);
|
||||
|
||||
assertArrayEquals(orig, dest);
|
||||
|
||||
}
|
||||
|
||||
public void testDate() {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
|
||||
Calendar expected = Calendar.getInstance();
|
||||
expected.set(2008, 1, 2, 3, 4, 5);
|
||||
|
||||
byte[] buf = PwDate.writeTime(expected.getTime(), cal);
|
||||
Calendar actual = Calendar.getInstance();
|
||||
actual.setTime(PwDate.readTime(buf, 0, cal));
|
||||
|
||||
assertEquals("Year mismatch: ", 2008, actual.get(Calendar.YEAR));
|
||||
assertEquals("Month mismatch: ", 1, actual.get(Calendar.MONTH));
|
||||
assertEquals("Day mismatch: ", 1, actual.get(Calendar.DAY_OF_MONTH));
|
||||
assertEquals("Hour mismatch: ", 3, actual.get(Calendar.HOUR_OF_DAY));
|
||||
assertEquals("Minute mismatch: ", 4, actual.get(Calendar.MINUTE));
|
||||
assertEquals("Second mismatch: ", 5, actual.get(Calendar.SECOND));
|
||||
}
|
||||
|
||||
public void testUUID() {
|
||||
Random rnd = new Random();
|
||||
byte[] bUUID = new byte[16];
|
||||
rnd.nextBytes(bUUID);
|
||||
|
||||
UUID uuid = Types.bytestoUUID(bUUID);
|
||||
byte[] eUUID = Types.UUIDtoBytes(uuid);
|
||||
|
||||
assertArrayEquals("UUID match failed", bUUID, eUUID);
|
||||
}
|
||||
|
||||
public void testULongMax() throws Exception {
|
||||
byte[] ulongBytes = new byte[8];
|
||||
for (int i = 0; i < ulongBytes.length; i++) {
|
||||
ulongBytes[i] = -1;
|
||||
}
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
LEDataOutputStream leos = new LEDataOutputStream(bos);
|
||||
leos.writeLong(Types.ULONG_MAX_VALUE);
|
||||
leos.close();
|
||||
|
||||
byte[] uLongMax = bos.toByteArray();
|
||||
|
||||
assertArrayEquals(ulongBytes, uLongMax);
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.crypto;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.crypto.CipherFactory;
|
||||
|
||||
public class AESTest extends TestCase {
|
||||
|
||||
private Random mRand = new Random();
|
||||
|
||||
public void testEncrypt() throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException {
|
||||
// Test above below and at the blocksize
|
||||
testFinal(15);
|
||||
testFinal(16);
|
||||
testFinal(17);
|
||||
|
||||
// Test random larger sizes
|
||||
int size = mRand.nextInt(494) + 18;
|
||||
testFinal(size);
|
||||
}
|
||||
|
||||
private void testFinal(int dataSize) throws NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException, InvalidAlgorithmParameterException {
|
||||
|
||||
// Generate some input
|
||||
byte[] input = new byte[dataSize];
|
||||
mRand.nextBytes(input);
|
||||
|
||||
// Generate key
|
||||
byte[] keyArray = new byte[32];
|
||||
mRand.nextBytes(keyArray);
|
||||
SecretKeySpec key = new SecretKeySpec(keyArray, "AES");
|
||||
|
||||
// Generate IV
|
||||
byte[] ivArray = new byte[16];
|
||||
mRand.nextBytes(ivArray);
|
||||
IvParameterSpec iv = new IvParameterSpec(ivArray);
|
||||
|
||||
Cipher android = CipherFactory.getInstance("AES/CBC/PKCS5Padding", true);
|
||||
android.init(Cipher.ENCRYPT_MODE, key, iv);
|
||||
byte[] outAndroid = android.doFinal(input, 0, dataSize);
|
||||
|
||||
Cipher nat = CipherFactory.getInstance("AES/CBC/PKCS5Padding");
|
||||
nat.init(Cipher.ENCRYPT_MODE, key, iv);
|
||||
byte[] outNative = nat.doFinal(input, 0, dataSize);
|
||||
|
||||
assertArrayEquals("Arrays differ on size: " + dataSize, outAndroid, outNative);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.crypto;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherOutputStream;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.crypto.CipherFactory;
|
||||
import com.keepassdroid.crypto.engine.AesEngine;
|
||||
import com.keepassdroid.crypto.engine.CipherEngine;
|
||||
import com.keepassdroid.stream.BetterCipherInputStream;
|
||||
import com.keepassdroid.stream.LEDataInputStream;
|
||||
|
||||
public class CipherTest extends TestCase {
|
||||
private Random rand = new Random();
|
||||
|
||||
public void testCipherFactory() throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException {
|
||||
byte[] key = new byte[32];
|
||||
byte[] iv = new byte[16];
|
||||
|
||||
byte[] plaintext = new byte[1024];
|
||||
|
||||
rand.nextBytes(key);
|
||||
rand.nextBytes(iv);
|
||||
rand.nextBytes(plaintext);
|
||||
|
||||
CipherEngine aes = CipherFactory.getInstance(AesEngine.CIPHER_UUID);
|
||||
Cipher encrypt = aes.getCipher(Cipher.ENCRYPT_MODE, key, iv);
|
||||
Cipher decrypt = aes.getCipher(Cipher.DECRYPT_MODE, key, iv);
|
||||
|
||||
byte[] secrettext = encrypt.doFinal(plaintext);
|
||||
byte[] decrypttext = decrypt.doFinal(secrettext);
|
||||
|
||||
assertArrayEquals("Encryption and decryption failed", plaintext, decrypttext);
|
||||
}
|
||||
|
||||
public void testCipherStreams() throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, IOException {
|
||||
final int MESSAGE_LENGTH = 1024;
|
||||
|
||||
byte[] key = new byte[32];
|
||||
byte[] iv = new byte[16];
|
||||
|
||||
byte[] plaintext = new byte[MESSAGE_LENGTH];
|
||||
|
||||
rand.nextBytes(key);
|
||||
rand.nextBytes(iv);
|
||||
rand.nextBytes(plaintext);
|
||||
|
||||
CipherEngine aes = CipherFactory.getInstance(AesEngine.CIPHER_UUID);
|
||||
Cipher encrypt = aes.getCipher(Cipher.ENCRYPT_MODE, key, iv);
|
||||
Cipher decrypt = aes.getCipher(Cipher.DECRYPT_MODE, key, iv);
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
CipherOutputStream cos = new CipherOutputStream(bos, encrypt);
|
||||
cos.write(plaintext);
|
||||
cos.close();
|
||||
|
||||
byte[] secrettext = bos.toByteArray();
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(secrettext);
|
||||
BetterCipherInputStream cis = new BetterCipherInputStream(bis, decrypt);
|
||||
LEDataInputStream lis = new LEDataInputStream(cis);
|
||||
|
||||
byte[] decrypttext = lis.readBytes(MESSAGE_LENGTH);
|
||||
|
||||
assertArrayEquals("Encryption and decryption failed", plaintext, decrypttext);
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.crypto;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.crypto.finalkey.AndroidFinalKey;
|
||||
import com.keepassdroid.crypto.finalkey.NativeFinalKey;
|
||||
|
||||
public class FinalKeyTest extends TestCase {
|
||||
private Random mRand;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
mRand = new Random();
|
||||
}
|
||||
|
||||
public void testNativeAndroid() throws IOException {
|
||||
// Test both an old and an even number to test my flip variable
|
||||
testNativeFinalKey(5);
|
||||
testNativeFinalKey(6);
|
||||
}
|
||||
|
||||
private void testNativeFinalKey(int rounds) throws IOException {
|
||||
byte[] seed = new byte[32];
|
||||
byte[] key = new byte[32];
|
||||
byte[] nativeKey;
|
||||
byte[] androidKey;
|
||||
|
||||
mRand.nextBytes(seed);
|
||||
mRand.nextBytes(key);
|
||||
|
||||
AndroidFinalKey aKey = new AndroidFinalKey();
|
||||
androidKey = aKey.transformMasterKey(seed, key, rounds);
|
||||
|
||||
NativeFinalKey nKey = new NativeFinalKey();
|
||||
nativeKey = nKey.transformMasterKey(seed, key, rounds);
|
||||
|
||||
assertArrayEquals("Does not match", androidKey, nativeKey);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.Database;
|
||||
import com.keepassdroid.database.PwDatabase;
|
||||
import com.keepassdroid.database.PwDatabaseV3;
|
||||
import com.keepassdroid.database.PwEntry;
|
||||
import com.keepassdroid.database.PwGroup;
|
||||
import com.keepassdroid.database.edit.DeleteGroup;
|
||||
import com.keepassdroid.search.SearchDbHelper;
|
||||
|
||||
public class DeleteEntry extends AndroidTestCase {
|
||||
private static final String GROUP1_NAME = "Group1";
|
||||
private static final String ENTRY1_NAME = "Test1";
|
||||
private static final String ENTRY2_NAME = "Test2";
|
||||
private static final String KEYFILE = "";
|
||||
private static final String PASSWORD = "12345";
|
||||
private static final String ASSET = "delete.kdb";
|
||||
private static final String FILENAME = "/sdcard/delete.kdb";
|
||||
|
||||
public void testDelete() {
|
||||
|
||||
Database db;
|
||||
|
||||
Context ctx = getContext();
|
||||
|
||||
try {
|
||||
db = TestData.GetDb(ctx, ASSET, PASSWORD, KEYFILE, FILENAME);
|
||||
} catch (Exception e) {
|
||||
assertTrue("Failed to open database: " + e.getMessage(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
PwDatabaseV3 pm = (PwDatabaseV3) db.pm;
|
||||
PwGroup group1 = getGroup(pm, GROUP1_NAME);
|
||||
assertNotNull("Could not find group1", group1);
|
||||
|
||||
// Delete the group
|
||||
DeleteGroup task = new DeleteGroup(db, group1, null, true);
|
||||
task.run();
|
||||
|
||||
// Verify the entries were deleted
|
||||
PwEntry entry1 = getEntry(pm, ENTRY1_NAME);
|
||||
assertNull("Entry 1 was not removed", entry1);
|
||||
|
||||
PwEntry entry2 = getEntry(pm, ENTRY2_NAME);
|
||||
assertNull("Entry 2 was not removed", entry2);
|
||||
|
||||
// Verify the entries were removed from the search index
|
||||
SearchDbHelper dbHelp = new SearchDbHelper(ctx);
|
||||
PwGroup results1 = dbHelp.search(db, ENTRY1_NAME);
|
||||
PwGroup results2 = dbHelp.search(db, ENTRY2_NAME);
|
||||
|
||||
assertEquals("Entry1 was not removed from the search results", 0, results1.childEntries.size());
|
||||
assertEquals("Entry2 was not removed from the search results", 0, results2.childEntries.size());
|
||||
|
||||
// Verify the group was deleted
|
||||
group1 = getGroup(pm, GROUP1_NAME);
|
||||
assertNull("Group 1 was not removed.", group1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private PwEntry getEntry(PwDatabaseV3 pm, String name) {
|
||||
List<PwEntry> entries = pm.entries;
|
||||
for ( int i = 0; i < entries.size(); i++ ) {
|
||||
PwEntry entry = entries.get(i);
|
||||
if ( entry.getTitle().equals(name) ) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
private PwGroup getGroup(PwDatabase pm, String name) {
|
||||
List<PwGroup> groups = pm.getGroups();
|
||||
for ( int i = 0; i < groups.size(); i++ ) {
|
||||
PwGroup group = groups.get(i);
|
||||
if ( group.getName().equals(name) ) {
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.database.PwDatabaseV4;
|
||||
import com.keepassdroid.database.PwEntryV4;
|
||||
|
||||
public class EntryV4 extends TestCase {
|
||||
|
||||
public void testBackup() {
|
||||
PwDatabaseV4 db = new PwDatabaseV4();
|
||||
|
||||
db.historyMaxItems = 2;
|
||||
|
||||
PwEntryV4 entry = new PwEntryV4();
|
||||
entry.setTitle("Title1", db);
|
||||
entry.setUsername("User1", db);
|
||||
entry.createBackup(db);
|
||||
|
||||
entry.setTitle("Title2", db);
|
||||
entry.setUsername("User2", db);
|
||||
entry.createBackup(db);
|
||||
|
||||
entry.setTitle("Title3", db);
|
||||
entry.setUsername("User3", db);
|
||||
entry.createBackup(db);
|
||||
|
||||
PwEntryV4 backup = entry.history.get(0);
|
||||
assertEquals("Title2", backup.getTitle());
|
||||
assertEquals("User2", backup.getUsername());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.database.load.ImporterV3;
|
||||
import com.keepassdroid.tests.TestUtil;
|
||||
import com.keepassdroid.utils.UriUtil;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.File;
|
||||
|
||||
public class Kdb3 extends AndroidTestCase {
|
||||
|
||||
private void testKeyfile(String dbAsset, String keyAsset, String password) throws Exception {
|
||||
Context ctx = getContext();
|
||||
|
||||
File sdcard = Environment.getExternalStorageDirectory();
|
||||
String keyPath = sdcard.getAbsolutePath() + "/key";
|
||||
|
||||
TestUtil.extractKey(ctx, keyAsset, keyPath);
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open(dbAsset, AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV3 importer = new ImporterV3();
|
||||
importer.openDatabase(is, password, TestUtil.getKeyFileInputStream(ctx, keyPath));
|
||||
|
||||
is.close();
|
||||
}
|
||||
|
||||
public void testXMLKeyFile() throws Exception {
|
||||
testKeyfile("kdb_with_xml_keyfile.kdb", "keyfile.key", "12345");
|
||||
}
|
||||
|
||||
public void testBinary64KeyFile() throws Exception {
|
||||
testKeyfile("binary-key.kdb", "binary.key", "12345");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.database.PwDatabaseV3;
|
||||
import com.keepassdroid.database.PwEncryptionAlgorithm;
|
||||
import com.keepassdroid.database.load.ImporterV3;
|
||||
|
||||
public class Kdb3Twofish extends AndroidTestCase {
|
||||
public void testReadTwofish() throws Exception {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("twofish.kdb", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV3 importer = new ImporterV3();
|
||||
|
||||
PwDatabaseV3 db = importer.openDatabase(is, "12345", null);
|
||||
|
||||
assertTrue(db.algorithm == PwEncryptionAlgorithm.Twofish);
|
||||
|
||||
is.close();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,171 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.database.PwDatabaseV4;
|
||||
import com.keepassdroid.database.exception.InvalidDBException;
|
||||
import com.keepassdroid.database.exception.PwDbOutputException;
|
||||
import com.keepassdroid.database.load.Importer;
|
||||
import com.keepassdroid.database.load.ImporterFactory;
|
||||
import com.keepassdroid.database.load.ImporterV4;
|
||||
import com.keepassdroid.database.save.PwDbOutput;
|
||||
import com.keepassdroid.database.save.PwDbV4Output;
|
||||
import com.keepassdroid.stream.CopyInputStream;
|
||||
import com.keepassdroid.tests.TestUtil;
|
||||
|
||||
public class Kdb4 extends AndroidTestCase {
|
||||
|
||||
public void testDetection() throws IOException, InvalidDBException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
Importer importer = ImporterFactory.createImporter(is);
|
||||
|
||||
assertTrue(importer instanceof ImporterV4);
|
||||
is.close();
|
||||
|
||||
}
|
||||
|
||||
public void testParsing() throws IOException, InvalidDBException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
importer.openDatabase(is, "12345", null);
|
||||
|
||||
is.close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void testSavingKDBXV3() throws IOException, InvalidDBException, PwDbOutputException {
|
||||
testSaving("test.kdbx", "12345", "test-out.kdbx");
|
||||
}
|
||||
|
||||
public void testSavingKDBXV4() throws IOException, InvalidDBException, PwDbOutputException {
|
||||
testSaving("test-kdbxv4.kdbx", "1", "test-kdbxv4-out.kdbx");
|
||||
}
|
||||
|
||||
private void testSaving(String inputFile, String password, String outputFile) throws IOException, InvalidDBException, PwDbOutputException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open(inputFile, AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
PwDatabaseV4 db = importer.openDatabase(is, password, null);
|
||||
is.close();
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
|
||||
PwDbV4Output output = (PwDbV4Output) PwDbOutput.getInstance(db, bos);
|
||||
output.output();
|
||||
|
||||
byte[] data = bos.toByteArray();
|
||||
|
||||
FileOutputStream fos = new FileOutputStream(TestUtil.getSdPath(outputFile), false);
|
||||
|
||||
InputStream bis = new ByteArrayInputStream(data);
|
||||
bis = new CopyInputStream(bis, fos);
|
||||
importer = new ImporterV4();
|
||||
db = importer.openDatabase(bis, password, null);
|
||||
bis.close();
|
||||
|
||||
fos.close();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
TestUtil.extractKey(getContext(), "keyfile.key", TestUtil.getSdPath("key"));
|
||||
TestUtil.extractKey(getContext(), "binary.key", TestUtil.getSdPath("key-binary"));
|
||||
}
|
||||
|
||||
public void testComposite() throws IOException, InvalidDBException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("keyfile.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
importer.openDatabase(is, "12345", TestUtil.getKeyFileInputStream(ctx, TestUtil.getSdPath("key")));
|
||||
|
||||
is.close();
|
||||
|
||||
}
|
||||
|
||||
public void testCompositeBinary() throws IOException, InvalidDBException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("keyfile-binary.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
importer.openDatabase(is, "12345", TestUtil.getKeyFileInputStream(ctx,TestUtil.getSdPath("key-binary")));
|
||||
|
||||
is.close();
|
||||
|
||||
}
|
||||
|
||||
public void testKeyfile() throws IOException, InvalidDBException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("key-only.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
importer.openDatabase(is, "", TestUtil.getKeyFileInputStream(ctx, TestUtil.getSdPath("key")));
|
||||
|
||||
is.close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void testNoGzip() throws IOException, InvalidDBException {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("no-encrypt.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
importer.openDatabase(is, "12345", null);
|
||||
|
||||
is.close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.crypto.CipherFactory;
|
||||
import com.keepassdroid.crypto.engine.AesEngine;
|
||||
import com.keepassdroid.database.PwDatabaseV4;
|
||||
import com.keepassdroid.database.load.ImporterV4;
|
||||
|
||||
public class Kdb4Header extends AndroidTestCase {
|
||||
public void testReadHeader() throws Exception {
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
|
||||
PwDatabaseV4 db = importer.openDatabase(is, "12345", null);
|
||||
|
||||
assertEquals(6000, db.numKeyEncRounds);
|
||||
|
||||
assertTrue(db.dataCipher.equals(AesEngine.CIPHER_UUID));
|
||||
|
||||
is.close();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.UUID;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.test.AndroidTestCase;
|
||||
import biz.source_code.base64Coder.Base64Coder;
|
||||
|
||||
import com.keepassdroid.database.PwDatabaseV4;
|
||||
import com.keepassdroid.database.PwEntryV4;
|
||||
import com.keepassdroid.database.load.ImporterV4;
|
||||
import com.keepassdroid.utils.SprEngine;
|
||||
import com.keepassdroid.utils.Types;
|
||||
|
||||
public class SprEngineTest extends AndroidTestCase {
|
||||
private PwDatabaseV4 db;
|
||||
private SprEngine spr;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
Context ctx = getContext();
|
||||
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
|
||||
|
||||
ImporterV4 importer = new ImporterV4();
|
||||
db = importer.openDatabase(is, "12345", null);
|
||||
|
||||
is.close();
|
||||
|
||||
spr = SprEngine.getInstance(db);
|
||||
}
|
||||
|
||||
private final String REF = "{REF:P@I:2B1D56590D961F48A8CE8C392CE6CD35}";
|
||||
private final String ENCODE_UUID = "IN7RkON49Ui1UZ2ddqmLcw==";
|
||||
private final String RESULT = "Password";
|
||||
public void testRefReplace() {
|
||||
UUID entryUUID = decodeUUID(ENCODE_UUID);
|
||||
|
||||
PwEntryV4 entry = (PwEntryV4) db.entries.get(entryUUID);
|
||||
|
||||
|
||||
assertEquals(RESULT, spr.compile(REF, entry, db));
|
||||
|
||||
}
|
||||
|
||||
private UUID decodeUUID(String encoded) {
|
||||
if (encoded == null || encoded.length() == 0 ) {
|
||||
return PwDatabaseV4.UUID_ZERO;
|
||||
}
|
||||
|
||||
byte[] buf = Base64Coder.decode(encoded);
|
||||
return Types.bytestoUUID(buf);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.database;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.net.Uri;
|
||||
|
||||
import com.keepassdroid.Database;
|
||||
import com.keepassdroid.database.PwDatabaseV3Debug;
|
||||
import com.keepassdroid.database.load.Importer;
|
||||
import com.keepassdroid.tests.TestUtil;
|
||||
import com.keepassdroid.utils.EmptyUtils;
|
||||
import com.keepassdroid.utils.UriUtil;
|
||||
|
||||
public class TestData {
|
||||
private static final String TEST1_KEYFILE = "";
|
||||
private static final String TEST1_KDB = "test1.kdb";
|
||||
private static final String TEST1_PASSWORD = "12345";
|
||||
|
||||
private static Database mDb1;
|
||||
|
||||
|
||||
public static Database GetDb1(Context ctx) throws Exception {
|
||||
return GetDb1(ctx, false);
|
||||
}
|
||||
|
||||
public static Database GetDb1(Context ctx, boolean forceReload) throws Exception {
|
||||
if ( mDb1 == null || forceReload ) {
|
||||
mDb1 = GetDb(ctx, TEST1_KDB, TEST1_PASSWORD, TEST1_KEYFILE, "/sdcard/test1.kdb");
|
||||
}
|
||||
|
||||
return mDb1;
|
||||
}
|
||||
|
||||
public static Database GetDb(Context ctx, String asset, String password, String keyfile, String filename) throws Exception {
|
||||
AssetManager am = ctx.getAssets();
|
||||
InputStream is = am.open(asset, AssetManager.ACCESS_STREAMING);
|
||||
|
||||
Database Db = new Database();
|
||||
|
||||
InputStream keyIs = TestUtil.getKeyFileInputStream(ctx, keyfile);
|
||||
|
||||
Db.LoadData(ctx, is, password, keyIs, Importer.DEBUG);
|
||||
Uri.Builder b = new Uri.Builder();
|
||||
|
||||
Db.mUri = b.scheme("file").path(filename).build();
|
||||
|
||||
return Db;
|
||||
|
||||
}
|
||||
|
||||
public static PwDatabaseV3Debug GetTest1(Context ctx) throws Exception {
|
||||
if ( mDb1 == null ) {
|
||||
GetDb1(ctx);
|
||||
}
|
||||
|
||||
return (PwDatabaseV3Debug) mDb1.pm;
|
||||
}
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.output;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.security.DigestOutputStream;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.keepassdroid.database.PwDatabaseV3Debug;
|
||||
import com.keepassdroid.database.PwDbHeader;
|
||||
import com.keepassdroid.database.PwDbHeaderV3;
|
||||
import com.keepassdroid.database.exception.PwDbOutputException;
|
||||
import com.keepassdroid.database.save.PwDbHeaderOutputV3;
|
||||
import com.keepassdroid.database.save.PwDbV3Output;
|
||||
import com.keepassdroid.database.save.PwDbV3OutputDebug;
|
||||
import com.keepassdroid.stream.NullOutputStream;
|
||||
import com.keepassdroid.tests.TestUtil;
|
||||
import com.keepassdroid.tests.database.TestData;
|
||||
|
||||
public class PwManagerOutputTest extends AndroidTestCase {
|
||||
PwDatabaseV3Debug mPM;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
mPM = TestData.GetTest1(getContext());
|
||||
}
|
||||
|
||||
public void testPlainContent() throws IOException, PwDbOutputException {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
|
||||
PwDbV3Output pos = new PwDbV3OutputDebug(mPM, bos, true);
|
||||
pos.outputPlanGroupAndEntries(bos);
|
||||
|
||||
assertTrue("No output", bos.toByteArray().length > 0);
|
||||
assertArrayEquals("Group and entry output doesn't match.", mPM.postHeader, bos.toByteArray());
|
||||
|
||||
}
|
||||
|
||||
public void testChecksum() throws NoSuchAlgorithmException, IOException, PwDbOutputException {
|
||||
//FileOutputStream fos = new FileOutputStream("/dev/null");
|
||||
NullOutputStream nos = new NullOutputStream();
|
||||
MessageDigest md = MessageDigest.getInstance("SHA-256");
|
||||
|
||||
DigestOutputStream dos = new DigestOutputStream(nos, md);
|
||||
|
||||
PwDbV3Output pos = new PwDbV3OutputDebug(mPM, dos, true);
|
||||
pos.outputPlanGroupAndEntries(dos);
|
||||
dos.close();
|
||||
|
||||
byte[] digest = md.digest();
|
||||
assertTrue("No output", digest.length > 0);
|
||||
assertArrayEquals("Hash of groups and entries failed.", mPM.dbHeader.contentsHash, digest);
|
||||
}
|
||||
|
||||
private void assertHeadersEquals(PwDbHeaderV3 expected, PwDbHeaderV3 actual) {
|
||||
assertEquals("Flags unequal", expected.flags, actual.flags);
|
||||
assertEquals("Entries unequal", expected.numEntries, actual.numEntries);
|
||||
assertEquals("Groups unequal", expected.numGroups, actual.numGroups);
|
||||
assertEquals("Key Rounds unequal", expected.numKeyEncRounds, actual.numKeyEncRounds);
|
||||
assertEquals("Signature1 unequal", expected.signature1, actual.signature1);
|
||||
assertEquals("Signature2 unequal", expected.signature2, actual.signature2);
|
||||
assertTrue("Version incompatible", PwDbHeaderV3.compatibleHeaders(expected.version, actual.version));
|
||||
assertArrayEquals("Hash unequal", expected.contentsHash, actual.contentsHash);
|
||||
assertArrayEquals("IV unequal", expected.encryptionIV, actual.encryptionIV);
|
||||
assertArrayEquals("Seed unequal", expected.masterSeed, actual.masterSeed);
|
||||
assertArrayEquals("Seed2 unequal", expected.transformSeed, actual.transformSeed);
|
||||
}
|
||||
|
||||
public void testHeader() throws PwDbOutputException, IOException {
|
||||
ByteArrayOutputStream bActual = new ByteArrayOutputStream();
|
||||
PwDbV3Output pActual = new PwDbV3OutputDebug(mPM, bActual, true);
|
||||
PwDbHeaderV3 header = pActual.outputHeader(bActual);
|
||||
|
||||
ByteArrayOutputStream bExpected = new ByteArrayOutputStream();
|
||||
PwDbHeaderOutputV3 outExpected = new PwDbHeaderOutputV3(mPM.dbHeader, bExpected);
|
||||
outExpected.output();
|
||||
|
||||
assertHeadersEquals(mPM.dbHeader, header);
|
||||
assertTrue("No output", bActual.toByteArray().length > 0);
|
||||
assertArrayEquals("Header does not match.", bExpected.toByteArray(), bActual.toByteArray());
|
||||
}
|
||||
|
||||
public void testFinalKey() throws PwDbOutputException {
|
||||
ByteArrayOutputStream bActual = new ByteArrayOutputStream();
|
||||
PwDbV3Output pActual = new PwDbV3OutputDebug(mPM, bActual, true);
|
||||
PwDbHeader hActual = pActual.outputHeader(bActual);
|
||||
byte[] finalKey = pActual.getFinalKey(hActual);
|
||||
|
||||
assertArrayEquals("Keys mismatched", mPM.finalKey, finalKey);
|
||||
|
||||
}
|
||||
|
||||
public void testFullWrite() throws IOException, PwDbOutputException {
|
||||
AssetManager am = getContext().getAssets();
|
||||
InputStream is = am.open("test1.kdb");
|
||||
|
||||
// Pull file into byte array (for streaming fun)
|
||||
ByteArrayOutputStream bExpected = new ByteArrayOutputStream();
|
||||
while (true) {
|
||||
int data = is.read();
|
||||
if ( data == -1 ) {
|
||||
break;
|
||||
}
|
||||
bExpected.write(data);
|
||||
}
|
||||
|
||||
ByteArrayOutputStream bActual = new ByteArrayOutputStream();
|
||||
PwDbV3Output pActual = new PwDbV3OutputDebug(mPM, bActual, true);
|
||||
pActual.output();
|
||||
//pActual.close();
|
||||
|
||||
FileOutputStream fos = new FileOutputStream(TestUtil.getSdPath("test1_out.kdb"));
|
||||
fos.write(bActual.toByteArray());
|
||||
fos.close();
|
||||
assertArrayEquals("Databases do not match.", bExpected.toByteArray(), bActual.toByteArray());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.search;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.kunzisoft.keepass.R;
|
||||
import com.keepassdroid.Database;
|
||||
import com.keepassdroid.database.PwGroup;
|
||||
import com.keepassdroid.tests.database.TestData;
|
||||
|
||||
public class SearchTest extends AndroidTestCase {
|
||||
|
||||
private Database mDb;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
mDb = TestData.GetDb1(getContext(), true);
|
||||
}
|
||||
|
||||
public void testSearch() {
|
||||
PwGroup results = mDb.Search("Amazon");
|
||||
assertTrue("Search result not found.", results.childEntries.size() > 0);
|
||||
|
||||
}
|
||||
|
||||
public void testBackupIncluded() {
|
||||
updateOmitSetting(false);
|
||||
PwGroup results = mDb.Search("BackupOnly");
|
||||
|
||||
assertTrue("Search result not found.", results.childEntries.size() > 0);
|
||||
}
|
||||
|
||||
public void testBackupExcluded() {
|
||||
updateOmitSetting(true);
|
||||
PwGroup results = mDb.Search("BackupOnly");
|
||||
|
||||
assertFalse("Search result found, but should not have been.", results.childEntries.size() > 0);
|
||||
}
|
||||
|
||||
private void updateOmitSetting(boolean setting) {
|
||||
Context ctx = getContext();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
|
||||
editor.putBoolean(ctx.getString(R.string.omitbackup_key), setting);
|
||||
editor.commit();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.stream;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.keepassdroid.stream.HashedBlockInputStream;
|
||||
import com.keepassdroid.stream.HashedBlockOutputStream;
|
||||
|
||||
public class HashedBlock extends TestCase {
|
||||
|
||||
private static Random rand = new Random();
|
||||
|
||||
public void testBlockAligned() throws IOException {
|
||||
testSize(1024, 1024);
|
||||
}
|
||||
|
||||
public void testOffset() throws IOException {
|
||||
testSize(1500, 1024);
|
||||
}
|
||||
|
||||
private void testSize(int blockSize, int bufferSize) throws IOException {
|
||||
byte[] orig = new byte[blockSize];
|
||||
|
||||
rand.nextBytes(orig);
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
HashedBlockOutputStream output = new HashedBlockOutputStream(bos, bufferSize);
|
||||
output.write(orig);
|
||||
output.close();
|
||||
|
||||
byte[] encoded = bos.toByteArray();
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(encoded);
|
||||
HashedBlockInputStream input = new HashedBlockInputStream(bis);
|
||||
|
||||
ByteArrayOutputStream decoded = new ByteArrayOutputStream();
|
||||
while ( true ) {
|
||||
byte[] buf = new byte[1024];
|
||||
int read = input.read(buf);
|
||||
if ( read == -1 ) {
|
||||
break;
|
||||
}
|
||||
|
||||
decoded.write(buf, 0, read);
|
||||
}
|
||||
|
||||
byte[] out = decoded.toByteArray();
|
||||
|
||||
assertArrayEquals(orig, out);
|
||||
|
||||
}
|
||||
|
||||
public void testGZIPStream() throws IOException {
|
||||
final int testLength = 32000;
|
||||
|
||||
byte[] orig = new byte[testLength];
|
||||
rand.nextBytes(orig);
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
HashedBlockOutputStream hos = new HashedBlockOutputStream(bos);
|
||||
GZIPOutputStream zos = new GZIPOutputStream(hos);
|
||||
|
||||
zos.write(orig);
|
||||
zos.close();
|
||||
|
||||
byte[] compressed = bos.toByteArray();
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(compressed);
|
||||
HashedBlockInputStream his = new HashedBlockInputStream(bis);
|
||||
GZIPInputStream zis = new GZIPInputStream(his);
|
||||
|
||||
byte[] uncompressed = new byte[testLength];
|
||||
|
||||
int read = 0;
|
||||
while (read != -1 && testLength - read > 0) {
|
||||
read += zis.read(uncompressed, read, testLength - read);
|
||||
|
||||
}
|
||||
|
||||
assertArrayEquals("Output not equal to input", orig, uncompressed);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.tests.utils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.keepassdroid.utils.StrUtil;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class StrUtilTest extends TestCase {
|
||||
private final String text = "AbCdEfGhIj";
|
||||
private final String search = "BcDe";
|
||||
private final String badSearch = "Ed";
|
||||
|
||||
public void testIndexOfIgnoreCase1() {
|
||||
assertEquals(1, StrUtil.indexOfIgnoreCase(text, search, Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public void testIndexOfIgnoreCase2() {
|
||||
assertEquals(-1, StrUtil.indexOfIgnoreCase(text, search, Locale.ENGLISH), 2);
|
||||
}
|
||||
|
||||
public void testIndexOfIgnoreCase3() {
|
||||
assertEquals(-1, StrUtil.indexOfIgnoreCase(text, badSearch, Locale.ENGLISH));
|
||||
}
|
||||
|
||||
private final String repText = "AbCtestingaBc";
|
||||
private final String repSearch = "ABc";
|
||||
private final String repSearchBad = "CCCCCC";
|
||||
private final String repNew = "12345";
|
||||
private final String repResult = "12345testing12345";
|
||||
public void testReplaceAllIgnoresCase1() {
|
||||
assertEquals(repResult, StrUtil.replaceAllIgnoresCase(repText, repSearch, repNew, Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public void testReplaceAllIgnoresCase2() {
|
||||
assertEquals(repText, StrUtil.replaceAllIgnoresCase(repText, repSearchBad, repNew, Locale.ENGLISH));
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* Copyright 2019 Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
@@ -17,27 +17,21 @@
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid;
|
||||
package com.kunzisoft.keepass.tests
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.Toast;
|
||||
import junit.framework.TestCase
|
||||
|
||||
public class UIToastTask implements Runnable {
|
||||
import com.kunzisoft.keepass.database.element.PwDate
|
||||
import org.junit.Assert
|
||||
|
||||
private String mText;
|
||||
private Context mCtx;
|
||||
|
||||
public UIToastTask(Context ctx, int resId) {
|
||||
mCtx = ctx;
|
||||
mText = ctx.getString(resId);
|
||||
}
|
||||
class PwDateTest : TestCase() {
|
||||
|
||||
public UIToastTask(Context ctx, String text) {
|
||||
mCtx = ctx;
|
||||
mText = text;
|
||||
}
|
||||
fun testDate() {
|
||||
val jDate = PwDate(System.currentTimeMillis())
|
||||
val intermediate = PwDate(jDate)
|
||||
val cDate = PwDate(intermediate.byteArrayDate!!, 0)
|
||||
|
||||
public void run() {
|
||||
Toast.makeText(mCtx, mText, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
Assert.assertTrue("jDate and intermediate not equal", jDate == intermediate)
|
||||
Assert.assertTrue("jDate and cDate not equal", cDate == jDate)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.kunzisoft.keepass.tests
|
||||
|
||||
import org.junit.Assert.assertArrayEquals
|
||||
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.util.Calendar
|
||||
import java.util.Random
|
||||
|
||||
import junit.framework.TestCase
|
||||
|
||||
import com.kunzisoft.keepass.database.element.PwDate
|
||||
import com.kunzisoft.keepass.stream.LEDataInputStream
|
||||
import com.kunzisoft.keepass.stream.LEDataOutputStream
|
||||
import com.kunzisoft.keepass.utils.Types
|
||||
|
||||
class TypesTest : TestCase() {
|
||||
|
||||
fun testReadWriteLongZero() {
|
||||
testReadWriteLong(0.toByte())
|
||||
}
|
||||
|
||||
fun testReadWriteLongMax() {
|
||||
testReadWriteLong(java.lang.Byte.MAX_VALUE)
|
||||
}
|
||||
|
||||
fun testReadWriteLongMin() {
|
||||
testReadWriteLong(java.lang.Byte.MIN_VALUE)
|
||||
}
|
||||
|
||||
fun testReadWriteLongRnd() {
|
||||
val rnd = Random()
|
||||
val buf = ByteArray(1)
|
||||
rnd.nextBytes(buf)
|
||||
|
||||
testReadWriteLong(buf[0])
|
||||
}
|
||||
|
||||
private fun testReadWriteLong(value: Byte) {
|
||||
val orig = ByteArray(8)
|
||||
val dest = ByteArray(8)
|
||||
|
||||
setArray(orig, value, 0, 8)
|
||||
|
||||
val one = LEDataInputStream.readLong(orig, 0)
|
||||
LEDataOutputStream.writeLong(one, dest, 0)
|
||||
|
||||
assertArrayEquals(orig, dest)
|
||||
|
||||
}
|
||||
|
||||
fun testReadWriteIntZero() {
|
||||
testReadWriteInt(0.toByte())
|
||||
}
|
||||
|
||||
fun testReadWriteIntMin() {
|
||||
testReadWriteInt(java.lang.Byte.MIN_VALUE)
|
||||
}
|
||||
|
||||
fun testReadWriteIntMax() {
|
||||
testReadWriteInt(java.lang.Byte.MAX_VALUE)
|
||||
}
|
||||
|
||||
private fun testReadWriteInt(value: Byte) {
|
||||
val orig = ByteArray(4)
|
||||
val dest = ByteArray(4)
|
||||
|
||||
for (i in 0..3) {
|
||||
orig[i] = 0
|
||||
}
|
||||
|
||||
setArray(orig, value, 0, 4)
|
||||
|
||||
val one = LEDataInputStream.readInt(orig, 0)
|
||||
|
||||
LEDataOutputStream.writeInt(one, dest, 0)
|
||||
|
||||
assertArrayEquals(orig, dest)
|
||||
|
||||
}
|
||||
|
||||
private fun setArray(buf: ByteArray, value: Byte, offset: Int, size: Int) {
|
||||
for (i in offset until offset + size) {
|
||||
buf[i] = value
|
||||
}
|
||||
}
|
||||
|
||||
fun testReadWriteShortOne() {
|
||||
val orig = ByteArray(2)
|
||||
|
||||
orig[0] = 0
|
||||
orig[1] = 1
|
||||
|
||||
val one = LEDataInputStream.readUShort(orig, 0)
|
||||
val dest = LEDataOutputStream.writeUShortBuf(one)
|
||||
|
||||
assertArrayEquals(orig, dest)
|
||||
|
||||
}
|
||||
|
||||
fun testReadWriteShortMin() {
|
||||
testReadWriteShort(java.lang.Byte.MIN_VALUE)
|
||||
}
|
||||
|
||||
fun testReadWriteShortMax() {
|
||||
testReadWriteShort(java.lang.Byte.MAX_VALUE)
|
||||
}
|
||||
|
||||
private fun testReadWriteShort(value: Byte) {
|
||||
val orig = ByteArray(2)
|
||||
val dest = ByteArray(2)
|
||||
|
||||
setArray(orig, value, 0, 2)
|
||||
|
||||
val one = LEDataInputStream.readUShort(orig, 0)
|
||||
LEDataOutputStream.writeUShort(one, dest, 0)
|
||||
|
||||
assertArrayEquals(orig, dest)
|
||||
|
||||
}
|
||||
|
||||
fun testReadWriteByteZero() {
|
||||
testReadWriteByte(0.toByte())
|
||||
}
|
||||
|
||||
fun testReadWriteByteMin() {
|
||||
testReadWriteByte(java.lang.Byte.MIN_VALUE)
|
||||
}
|
||||
|
||||
fun testReadWriteByteMax() {
|
||||
testReadWriteShort(java.lang.Byte.MAX_VALUE)
|
||||
}
|
||||
|
||||
private fun testReadWriteByte(value: Byte) {
|
||||
val orig = ByteArray(1)
|
||||
val dest = ByteArray(1)
|
||||
|
||||
setArray(orig, value, 0, 1)
|
||||
|
||||
val one = Types.readUByte(orig, 0)
|
||||
Types.writeUByte(one, dest, 0)
|
||||
|
||||
assertArrayEquals(orig, dest)
|
||||
|
||||
}
|
||||
|
||||
fun testDate() {
|
||||
val cal = Calendar.getInstance()
|
||||
|
||||
val expected = Calendar.getInstance()
|
||||
expected.set(2008, 1, 2, 3, 4, 5)
|
||||
|
||||
val buf = PwDate.writeTime(expected.time, cal)
|
||||
val actual = Calendar.getInstance()
|
||||
actual.time = PwDate.readTime(buf, 0, cal)
|
||||
|
||||
assertEquals("Year mismatch: ", 2008, actual.get(Calendar.YEAR))
|
||||
assertEquals("Month mismatch: ", 1, actual.get(Calendar.MONTH))
|
||||
assertEquals("Day mismatch: ", 1, actual.get(Calendar.DAY_OF_MONTH))
|
||||
assertEquals("Hour mismatch: ", 3, actual.get(Calendar.HOUR_OF_DAY))
|
||||
assertEquals("Minute mismatch: ", 4, actual.get(Calendar.MINUTE))
|
||||
assertEquals("Second mismatch: ", 5, actual.get(Calendar.SECOND))
|
||||
}
|
||||
|
||||
fun testUUID() {
|
||||
val rnd = Random()
|
||||
val bUUID = ByteArray(16)
|
||||
rnd.nextBytes(bUUID)
|
||||
|
||||
val uuid = Types.bytestoUUID(bUUID)
|
||||
val eUUID = Types.UUIDtoBytes(uuid)
|
||||
|
||||
assertArrayEquals("UUID match failed", bUUID, eUUID)
|
||||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun testULongMax() {
|
||||
val ulongBytes = ByteArray(8)
|
||||
for (i in ulongBytes.indices) {
|
||||
ulongBytes[i] = -1
|
||||
}
|
||||
|
||||
val bos = ByteArrayOutputStream()
|
||||
val leos = LEDataOutputStream(bos)
|
||||
leos.writeLong(Types.ULONG_MAX_VALUE)
|
||||
leos.close()
|
||||
|
||||
val uLongMax = bos.toByteArray()
|
||||
|
||||
assertArrayEquals(ulongBytes, uLongMax)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.kunzisoft.keepass.tests.crypto
|
||||
|
||||
import com.kunzisoft.keepass.crypto.CipherFactory
|
||||
|
||||
import junit.framework.TestCase
|
||||
|
||||
import java.security.InvalidAlgorithmParameterException
|
||||
import java.security.InvalidKeyException
|
||||
import java.security.NoSuchAlgorithmException
|
||||
import java.util.Random
|
||||
|
||||
import javax.crypto.BadPaddingException
|
||||
import javax.crypto.Cipher
|
||||
import javax.crypto.IllegalBlockSizeException
|
||||
import javax.crypto.NoSuchPaddingException
|
||||
import javax.crypto.spec.IvParameterSpec
|
||||
import javax.crypto.spec.SecretKeySpec
|
||||
|
||||
import org.junit.Assert.assertArrayEquals
|
||||
|
||||
class AESTest : TestCase() {
|
||||
|
||||
private val mRand = Random()
|
||||
|
||||
@Throws(InvalidKeyException::class, NoSuchAlgorithmException::class, NoSuchPaddingException::class, IllegalBlockSizeException::class, BadPaddingException::class, InvalidAlgorithmParameterException::class)
|
||||
fun testEncrypt() {
|
||||
// Test above below and at the blocksize
|
||||
testFinal(15)
|
||||
testFinal(16)
|
||||
testFinal(17)
|
||||
|
||||
// Test random larger sizes
|
||||
val size = mRand.nextInt(494) + 18
|
||||
testFinal(size)
|
||||
}
|
||||
|
||||
@Throws(NoSuchAlgorithmException::class, NoSuchPaddingException::class, IllegalBlockSizeException::class, BadPaddingException::class, InvalidKeyException::class, InvalidAlgorithmParameterException::class)
|
||||
private fun testFinal(dataSize: Int) {
|
||||
|
||||
// Generate some input
|
||||
val input = ByteArray(dataSize)
|
||||
mRand.nextBytes(input)
|
||||
|
||||
// Generate key
|
||||
val keyArray = ByteArray(32)
|
||||
mRand.nextBytes(keyArray)
|
||||
val key = SecretKeySpec(keyArray, "AES")
|
||||
|
||||
// Generate IV
|
||||
val ivArray = ByteArray(16)
|
||||
mRand.nextBytes(ivArray)
|
||||
val iv = IvParameterSpec(ivArray)
|
||||
|
||||
val android = CipherFactory.getInstance("AES/CBC/PKCS5Padding", true)
|
||||
android.init(Cipher.ENCRYPT_MODE, key, iv)
|
||||
val outAndroid = android.doFinal(input, 0, dataSize)
|
||||
|
||||
val nat = CipherFactory.getInstance("AES/CBC/PKCS5Padding")
|
||||
nat.init(Cipher.ENCRYPT_MODE, key, iv)
|
||||
val outNative = nat.doFinal(input, 0, dataSize)
|
||||
|
||||
assertArrayEquals("Arrays differ on size: $dataSize", outAndroid, outNative)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.kunzisoft.keepass.tests.crypto
|
||||
|
||||
import org.junit.Assert.assertArrayEquals
|
||||
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.IOException
|
||||
import java.security.InvalidAlgorithmParameterException
|
||||
import java.security.InvalidKeyException
|
||||
import java.security.NoSuchAlgorithmException
|
||||
import java.util.Random
|
||||
|
||||
import javax.crypto.BadPaddingException
|
||||
import javax.crypto.Cipher
|
||||
import javax.crypto.CipherOutputStream
|
||||
import javax.crypto.IllegalBlockSizeException
|
||||
import javax.crypto.NoSuchPaddingException
|
||||
|
||||
import junit.framework.TestCase
|
||||
|
||||
import com.kunzisoft.keepass.crypto.CipherFactory
|
||||
import com.kunzisoft.keepass.crypto.engine.AesEngine
|
||||
import com.kunzisoft.keepass.crypto.engine.CipherEngine
|
||||
import com.kunzisoft.keepass.stream.BetterCipherInputStream
|
||||
import com.kunzisoft.keepass.stream.LEDataInputStream
|
||||
|
||||
class CipherTest : TestCase() {
|
||||
private val rand = Random()
|
||||
|
||||
@Throws(InvalidKeyException::class, NoSuchAlgorithmException::class, NoSuchPaddingException::class, InvalidAlgorithmParameterException::class, IllegalBlockSizeException::class, BadPaddingException::class)
|
||||
fun testCipherFactory() {
|
||||
val key = ByteArray(32)
|
||||
val iv = ByteArray(16)
|
||||
|
||||
val plaintext = ByteArray(1024)
|
||||
|
||||
rand.nextBytes(key)
|
||||
rand.nextBytes(iv)
|
||||
rand.nextBytes(plaintext)
|
||||
|
||||
val aes = CipherFactory.getInstance(AesEngine.CIPHER_UUID)
|
||||
val encrypt = aes.getCipher(Cipher.ENCRYPT_MODE, key, iv)
|
||||
val decrypt = aes.getCipher(Cipher.DECRYPT_MODE, key, iv)
|
||||
|
||||
val secrettext = encrypt.doFinal(plaintext)
|
||||
val decrypttext = decrypt.doFinal(secrettext)
|
||||
|
||||
assertArrayEquals("Encryption and decryption failed", plaintext, decrypttext)
|
||||
}
|
||||
|
||||
@Throws(InvalidKeyException::class, NoSuchAlgorithmException::class, NoSuchPaddingException::class, InvalidAlgorithmParameterException::class, IllegalBlockSizeException::class, BadPaddingException::class, IOException::class)
|
||||
fun testCipherStreams() {
|
||||
val MESSAGE_LENGTH = 1024
|
||||
|
||||
val key = ByteArray(32)
|
||||
val iv = ByteArray(16)
|
||||
|
||||
val plaintext = ByteArray(MESSAGE_LENGTH)
|
||||
|
||||
rand.nextBytes(key)
|
||||
rand.nextBytes(iv)
|
||||
rand.nextBytes(plaintext)
|
||||
|
||||
val aes = CipherFactory.getInstance(AesEngine.CIPHER_UUID)
|
||||
val encrypt = aes.getCipher(Cipher.ENCRYPT_MODE, key, iv)
|
||||
val decrypt = aes.getCipher(Cipher.DECRYPT_MODE, key, iv)
|
||||
|
||||
val bos = ByteArrayOutputStream()
|
||||
val cos = CipherOutputStream(bos, encrypt)
|
||||
cos.write(plaintext)
|
||||
cos.close()
|
||||
|
||||
val secrettext = bos.toByteArray()
|
||||
|
||||
val bis = ByteArrayInputStream(secrettext)
|
||||
val cis = BetterCipherInputStream(bis, decrypt)
|
||||
val lis = LEDataInputStream(cis)
|
||||
|
||||
val decrypttext = lis.readBytes(MESSAGE_LENGTH)
|
||||
|
||||
assertArrayEquals("Encryption and decryption failed", plaintext, decrypttext)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.kunzisoft.keepass.tests.crypto
|
||||
|
||||
import org.junit.Assert.assertArrayEquals
|
||||
|
||||
import java.io.IOException
|
||||
import java.util.Random
|
||||
|
||||
import junit.framework.TestCase
|
||||
|
||||
import com.kunzisoft.keepass.crypto.finalkey.AndroidFinalKey
|
||||
import com.kunzisoft.keepass.crypto.finalkey.NativeFinalKey
|
||||
|
||||
class FinalKeyTest : TestCase() {
|
||||
private var mRand: Random? = null
|
||||
|
||||
@Throws(Exception::class)
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
|
||||
mRand = Random()
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun testNativeAndroid() {
|
||||
// Test both an old and an even number to test my flip variable
|
||||
testNativeFinalKey(5)
|
||||
testNativeFinalKey(6)
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun testNativeFinalKey(rounds: Int) {
|
||||
val seed = ByteArray(32)
|
||||
val key = ByteArray(32)
|
||||
val nativeKey: ByteArray
|
||||
val androidKey: ByteArray
|
||||
|
||||
mRand!!.nextBytes(seed)
|
||||
mRand!!.nextBytes(key)
|
||||
|
||||
val aKey = AndroidFinalKey()
|
||||
androidKey = aKey.transformMasterKey(seed, key, rounds.toLong())
|
||||
|
||||
val nKey = NativeFinalKey()
|
||||
nativeKey = nKey.transformMasterKey(seed, key, rounds.toLong())
|
||||
|
||||
assertArrayEquals("Does not match", androidKey, nativeKey)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.kunzisoft.keepass.tests.stream
|
||||
|
||||
import org.junit.Assert.assertArrayEquals
|
||||
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.IOException
|
||||
import java.util.Random
|
||||
import java.util.zip.GZIPInputStream
|
||||
import java.util.zip.GZIPOutputStream
|
||||
|
||||
import junit.framework.TestCase
|
||||
|
||||
import com.kunzisoft.keepass.stream.HashedBlockInputStream
|
||||
import com.kunzisoft.keepass.stream.HashedBlockOutputStream
|
||||
|
||||
class HashedBlock : TestCase() {
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun testBlockAligned() {
|
||||
testSize(1024, 1024)
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun testOffset() {
|
||||
testSize(1500, 1024)
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun testSize(blockSize: Int, bufferSize: Int) {
|
||||
val orig = ByteArray(blockSize)
|
||||
|
||||
rand.nextBytes(orig)
|
||||
|
||||
val bos = ByteArrayOutputStream()
|
||||
val output = HashedBlockOutputStream(bos, bufferSize)
|
||||
output.write(orig)
|
||||
output.close()
|
||||
|
||||
val encoded = bos.toByteArray()
|
||||
|
||||
val bis = ByteArrayInputStream(encoded)
|
||||
val input = HashedBlockInputStream(bis)
|
||||
|
||||
val decoded = ByteArrayOutputStream()
|
||||
while (true) {
|
||||
val buf = ByteArray(1024)
|
||||
val read = input.read(buf)
|
||||
if (read == -1) {
|
||||
break
|
||||
}
|
||||
|
||||
decoded.write(buf, 0, read)
|
||||
}
|
||||
|
||||
val out = decoded.toByteArray()
|
||||
|
||||
assertArrayEquals(orig, out)
|
||||
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun testGZIPStream() {
|
||||
val testLength = 32000
|
||||
|
||||
val orig = ByteArray(testLength)
|
||||
rand.nextBytes(orig)
|
||||
|
||||
val bos = ByteArrayOutputStream()
|
||||
val hos = HashedBlockOutputStream(bos)
|
||||
val zos = GZIPOutputStream(hos)
|
||||
|
||||
zos.write(orig)
|
||||
zos.close()
|
||||
|
||||
val compressed = bos.toByteArray()
|
||||
val bis = ByteArrayInputStream(compressed)
|
||||
val his = HashedBlockInputStream(bis)
|
||||
val zis = GZIPInputStream(his)
|
||||
|
||||
val uncompressed = ByteArray(testLength)
|
||||
|
||||
var read = 0
|
||||
while (read != -1 && testLength - read > 0) {
|
||||
read += zis.read(uncompressed, read, testLength - read)
|
||||
|
||||
}
|
||||
|
||||
assertArrayEquals("Output not equal to input", orig, uncompressed)
|
||||
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
private val rand = Random()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.kunzisoft.keepass.tests.utils
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
import com.kunzisoft.keepass.utils.StringUtil
|
||||
|
||||
import junit.framework.TestCase
|
||||
|
||||
class StringUtilTest : TestCase() {
|
||||
private val text = "AbCdEfGhIj"
|
||||
private val search = "BcDe"
|
||||
private val badSearch = "Ed"
|
||||
|
||||
private val repText = "AbCtestingaBc"
|
||||
private val repSearch = "ABc"
|
||||
private val repSearchBad = "CCCCCC"
|
||||
private val repNew = "12345"
|
||||
private val repResult = "12345testing12345"
|
||||
|
||||
fun testIndexOfIgnoreCase1() {
|
||||
assertEquals(1, StringUtil.indexOfIgnoreCase(text, search, Locale.ENGLISH))
|
||||
}
|
||||
|
||||
fun testIndexOfIgnoreCase2() {
|
||||
assertEquals(-1f, StringUtil.indexOfIgnoreCase(text, search, Locale.ENGLISH).toFloat(), 2f)
|
||||
}
|
||||
|
||||
fun testIndexOfIgnoreCase3() {
|
||||
assertEquals(-1, StringUtil.indexOfIgnoreCase(text, badSearch, Locale.ENGLISH))
|
||||
}
|
||||
|
||||
fun testReplaceAllIgnoresCase1() {
|
||||
assertEquals(repResult, StringUtil.replaceAllIgnoresCase(repText, repSearch, repNew, Locale.ENGLISH))
|
||||
}
|
||||
|
||||
fun testReplaceAllIgnoresCase2() {
|
||||
assertEquals(repText, StringUtil.replaceAllIgnoresCase(repText, repSearchBad, repNew, Locale.ENGLISH))
|
||||
}
|
||||
}
|
||||
50
app/src/free/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108"
|
||||
android:width="108dp"
|
||||
android:height="108dp">
|
||||
<group
|
||||
android:translateY="-332">
|
||||
<group
|
||||
android:translateY="332">
|
||||
<path
|
||||
android:pathData="M65.728516 32.791016L58.052734 35.904297 56.173828 48.380859 35.306641 69.267578 35.238281 73.759766 69.478516 108 108 108 108 70.810547 73.09375 35.904297 65.728516 32.791016Z"
|
||||
android:fillColor="@color/long_shadow"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeMiterLimit="4" />
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="0.3939503"
|
||||
android:scaleY="0.3939503"
|
||||
android:translateX="33.66343"
|
||||
android:translateY="233.998">
|
||||
<path
|
||||
android:pathData="M88.76953 339.91602L4.1718754 424.59766 4.0000004 436 15.400391 435.82813 27.240234 424 40 424l0 -12 12 0 0 -12.73438 34.01172 -33.97656A8 8 0 0 1 84 360a8 8 0 0 1 8 -8 8 8 0 0 1 5.296882 2.01367l2.787098 -2.7832 -11.31445 -11.31445z"
|
||||
android:fillColor="#eaeaea"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#58000000" />
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="0.3939503"
|
||||
android:scaleY="0.3939503"
|
||||
android:translateX="33.66343"
|
||||
android:translateY="233.998">
|
||||
<path
|
||||
android:pathData="M4.0000004 340L4.1718754 351.40137 88.59863 435.82812 100 436 99.828122 424.59863 15.401367 340.17188Z"
|
||||
android:fillColor="#81c784" />
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="0.3939503"
|
||||
android:scaleY="0.3939503"
|
||||
android:translateX="33.66343"
|
||||
android:translateY="233.998">
|
||||
<path
|
||||
android:pathData="M81.39454 332.00195a27 27 0 0 0 -19.48634 7.90625 27 27 0 0 0 0 38.1836 27 27 0 0 0 38.1836 0 27 27 0 0 0 0 -38.1836 27 27 0 0 0 -18.69726 -7.90625zM92 352a8 8 0 0 1 8 8 8 8 0 0 1 -8 8 8 8 0 0 1 -8 -8 8 8 0 0 1 8 -8z"
|
||||
android:fillColor="#eaeaea"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#58000000" />
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
5
app/src/free/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/green" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
5
app/src/free/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/green" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/free/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/free/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/free/res/mipmap-ldpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/free/res/mipmap-ldpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/free/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/free/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/free/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
app/src/free/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
app/src/free/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
app/src/free/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/free/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/free/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
50
app/src/libre/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108"
|
||||
android:width="108dp"
|
||||
android:height="108dp">
|
||||
<group
|
||||
android:translateY="-332">
|
||||
<group
|
||||
android:translateY="332">
|
||||
<path
|
||||
android:pathData="M65.728516 32.791016L58.052734 35.904297 56.173828 48.380859 35.306641 69.267578 35.238281 73.759766 69.478516 108 108 108 108 70.810547 73.09375 35.904297 65.728516 32.791016Z"
|
||||
android:fillColor="@color/long_shadow"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeMiterLimit="4" />
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="0.3939503"
|
||||
android:scaleY="0.3939503"
|
||||
android:translateX="33.66343"
|
||||
android:translateY="233.998">
|
||||
<path
|
||||
android:pathData="M88.76953 339.91602L4.1718754 424.59766 4.0000004 436 15.400391 435.82813 27.240234 424 40 424l0 -12 12 0 0 -12.73438 34.01172 -33.97656A8 8 0 0 1 84 360a8 8 0 0 1 8 -8 8 8 0 0 1 5.296882 2.01367l2.787098 -2.7832 -11.31445 -11.31445z"
|
||||
android:fillColor="#eaeaea"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#58000000"/>
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="0.3939503"
|
||||
android:scaleY="0.3939503"
|
||||
android:translateX="33.66343"
|
||||
android:translateY="233.998">
|
||||
<path
|
||||
android:pathData="M4.0000004 340L4.1718754 351.40137 88.59863 435.82812 100 436 99.828122 424.59863 15.401367 340.17188Z"
|
||||
android:fillColor="#64b5f6" />
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="0.3939503"
|
||||
android:scaleY="0.3939503"
|
||||
android:translateX="33.66343"
|
||||
android:translateY="233.998">
|
||||
<path
|
||||
android:pathData="M81.39454 332.00195a27 27 0 0 0 -19.48634 7.90625 27 27 0 0 0 0 38.1836 27 27 0 0 0 38.1836 0 27 27 0 0 0 0 -38.1836 27 27 0 0 0 -18.69726 -7.90625zM92 352a8 8 0 0 1 8 8 8 8 0 0 1 -8 8 8 8 0 0 1 -8 -8 8 8 0 0 1 8 -8z"
|
||||
android:fillColor="#eaeaea"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#58000000" />
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
5
app/src/libre/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/green" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/green" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/libre/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/libre/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
app/src/libre/res/mipmap-ldpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/libre/res/mipmap-ldpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/libre/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/libre/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/libre/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
app/src/libre/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
app/src/libre/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
app/src/libre/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/libre/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/libre/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.kunzisoft.keepass"
|
||||
android:installLocation="auto">
|
||||
<supports-screens
|
||||
@@ -8,7 +7,8 @@
|
||||
android:normalScreens="true"
|
||||
android:largeScreens="true"
|
||||
android:anyDensity="true" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
|
||||
@@ -16,58 +16,39 @@
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:name="com.keepassdroid.app.App"
|
||||
android:name="com.kunzisoft.keepass.app.App"
|
||||
android:allowBackup="true"
|
||||
android:fullBackupContent="@xml/backup"
|
||||
android:backupAgent="com.keepassdroid.backup.SettingsBackupAgent"
|
||||
android:theme="@style/KeepassDXStyle.Light"
|
||||
tools:replace="android:theme">
|
||||
android:backupAgent="com.kunzisoft.keepass.backup.SettingsBackupAgent"
|
||||
android:theme="@style/KeepassDXStyle.Night">
|
||||
<!-- TODO backup API Key -->
|
||||
<meta-data android:name="com.google.android.backup.api_key"
|
||||
android:value="" />
|
||||
<meta-data
|
||||
android:name="com.google.android.backup.api_key"
|
||||
android:value="" />
|
||||
|
||||
<!-- Folder picker -->
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/nnf_provider_paths" />
|
||||
</provider>
|
||||
<activity
|
||||
android:name="com.keepassdroid.FilePickerStylishActivity"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.GET_CONTENT" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".KeePass"
|
||||
android:label="@string/app_name">
|
||||
android:name="com.kunzisoft.keepass.activities.FileDatabaseSelectActivity"
|
||||
android:theme="@style/KeepassDXStyle.SplashScreen"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:configChanges="keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.fileselect.FileSelectActivity"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<activity android:name="com.keepassdroid.AboutActivity"
|
||||
android:launchMode="singleInstance"
|
||||
android:label="@string/menu_about" />
|
||||
<activity android:name="com.keepassdroid.PasswordActivity"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.PasswordActivity"
|
||||
android:configChanges="keyboardHidden"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="content" />
|
||||
<data android:mimeType="application/octet-stream" />
|
||||
<data android:mimeType="*/*" />
|
||||
<data android:host="*" />
|
||||
<data android:pathPattern=".*\\.kdb" />
|
||||
<data android:pathPattern=".*\\..*\\.kdb" />
|
||||
@@ -90,42 +71,111 @@
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="content" />
|
||||
<data android:mimeType="application/octet-stream" />
|
||||
<data android:mimeType="application/x-kdb" />
|
||||
<data android:mimeType="application/x-kdbx" />
|
||||
<data android:mimeType="application/x-keepass" />
|
||||
<data android:host="*" />
|
||||
<data android:pathPattern=".*" />
|
||||
<data android:pathPattern=".*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.*" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.GroupActivityV3" android:configChanges="orientation|keyboardHidden">
|
||||
<meta-data android:name="android.app.default_searchable"
|
||||
android:value="com.keepassdroid.search.SearchResults" />
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.GroupActivityV4" android:configChanges="orientation|keyboardHidden">
|
||||
<meta-data android:name="android.app.default_searchable"
|
||||
android:value="com.keepassdroid.search.SearchResults"
|
||||
android:exported="false" />
|
||||
</activity>
|
||||
<!-- Main Activity -->
|
||||
<activity
|
||||
android:name="com.keepassdroid.EntryActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<activity
|
||||
android:name="com.keepassdroid.EntryActivityV4"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<activity
|
||||
android:name="com.keepassdroid.EntryEditActivityV3"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<activity
|
||||
android:name="com.keepassdroid.EntryEditActivityV4"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<activity android:name="com.keepassdroid.search.SearchResultsActivity" android:launchMode="standard">
|
||||
android:name="com.kunzisoft.keepass.activities.GroupActivity"
|
||||
android:configChanges="keyboardHidden"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:launchMode="singleTask">
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value="com.kunzisoft.keepass.search.SearchResults"
|
||||
android:exported="false"/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.EntryActivity"
|
||||
android:configChanges="keyboardHidden" />
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.EntryEditActivity"
|
||||
android:configChanges="keyboardHidden"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<!-- About and Settings -->
|
||||
<activity
|
||||
android:name="com.kunzisoft.keepass.activities.AboutActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/menu_about" />
|
||||
<activity android:name="com.kunzisoft.keepass.settings.SettingsActivity" />
|
||||
<activity android:name="com.kunzisoft.keepass.autofill.AutofillLauncherActivity"
|
||||
android:configChanges="keyboardHidden" />
|
||||
<activity android:name="com.kunzisoft.keepass.settings.SettingsAdvancedUnlockActivity" />
|
||||
<activity android:name="com.kunzisoft.keepass.settings.SettingsAutofillActivity" />
|
||||
<activity android:name="com.kunzisoft.keepass.magikeyboard.KeyboardLauncherActivity"
|
||||
android:label="@string/keyboard_name">
|
||||
</activity>
|
||||
<activity android:name="com.kunzisoft.keepass.settings.MagikIMESettings"
|
||||
android:label="@string/keyboard_setting_label">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.settings.SettingsActivity" />
|
||||
|
||||
<service android:name="com.keepassdroid.services.TimeoutService" />
|
||||
|
||||
<service
|
||||
android:name="com.kunzisoft.keepass.notifications.DatabaseTaskNotificationService"
|
||||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
<service
|
||||
android:name="com.kunzisoft.keepass.notifications.ClipboardEntryNotificationService"
|
||||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
<!-- Receiver for Autofill -->
|
||||
<service
|
||||
android:name="com.kunzisoft.keepass.autofill.KeeAutofillService"
|
||||
android:label="@string/autofill_service_name"
|
||||
android:permission="android.permission.BIND_AUTOFILL_SERVICE">
|
||||
<meta-data
|
||||
android:name="android.autofill"
|
||||
android:resource="@xml/dataset_service" />
|
||||
<intent-filter>
|
||||
<action android:name="android.service.autofill.AutofillService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
android:name="com.kunzisoft.keepass.magikeyboard.MagikIME"
|
||||
android:label="@string/keyboard_label"
|
||||
android:permission="android.permission.BIND_INPUT_METHOD" >
|
||||
<meta-data android:name="android.view.im"
|
||||
android:resource="@xml/keyboard_method"/>
|
||||
<intent-filter>
|
||||
<action android:name="android.view.InputMethod" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
android:name="com.kunzisoft.keepass.notifications.KeyboardEntryNotificationService"
|
||||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
|
||||
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
||||
</application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
v7<EFBFBD><07>gx<67><78><EFBFBD>"<04>Dm<44>]tIWRP<52>g<18>y<15>/˰1<CBB0><31><13>X<0B><>fW[<5B>F%<25><1E>\<5C>up4
|
||||
<EFBFBD><EFBFBD>-t;<3B>z<EFBFBD>
|
||||
BIN
app/src/main/assets/fonts/FiraMono-Regular.ttf
Normal file
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<KeyFile>
|
||||
<Meta>
|
||||
<Version>1.00</Version>
|
||||
</Meta>
|
||||
<Key>
|
||||
<Data>zaTWphVNtRbspnwkqjy8FGTy5IqCUx9+FNb5H+VdB24=</Data>
|
||||
</Key>
|
||||
</KeyFile>
|
||||
@@ -1,225 +0,0 @@
|
||||
// Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
|
||||
// www.source-code.biz, www.inventec.ch/chdh
|
||||
//
|
||||
// This module is multi-licensed and may be used under the terms
|
||||
// of any of the following licenses:
|
||||
//
|
||||
// EPL, Eclipse Public License, http://www.eclipse.org/legal
|
||||
// LGPL, GNU Lesser General Public License, http://www.gnu.org/licenses/lgpl.html
|
||||
// AL, Apache License, http://www.apache.org/licenses
|
||||
// BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
// Please contact the author if you need another license.
|
||||
// This module is provided "as is", without warranties of any kind.
|
||||
|
||||
package biz.source_code.base64Coder;
|
||||
|
||||
/**
|
||||
* A Base64 encoder/decoder.
|
||||
*
|
||||
* <p>
|
||||
* This class is used to encode and decode data in Base64 format as described in RFC 1521.
|
||||
*
|
||||
* <p>
|
||||
* Project home page: <a href="http://www.source-code.biz/base64coder/java/">www.source-code.biz/base64coder/java</a><br>
|
||||
* Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland<br>
|
||||
* Multi-licensed: EPL / LGPL / AL / BSD.
|
||||
*/
|
||||
public class Base64Coder {
|
||||
|
||||
// The line separator string of the operating system.
|
||||
private static final String systemLineSeparator = System.getProperty("line.separator");
|
||||
|
||||
// Mapping table from 6-bit nibbles to Base64 characters.
|
||||
private static char[] map1 = new char[64];
|
||||
static {
|
||||
int i=0;
|
||||
for (char c='A'; c<='Z'; c++) map1[i++] = c;
|
||||
for (char c='a'; c<='z'; c++) map1[i++] = c;
|
||||
for (char c='0'; c<='9'; c++) map1[i++] = c;
|
||||
map1[i++] = '+'; map1[i++] = '/'; }
|
||||
|
||||
// Mapping table from Base64 characters to 6-bit nibbles.
|
||||
private static byte[] map2 = new byte[128];
|
||||
static {
|
||||
for (int i=0; i<map2.length; i++) map2[i] = -1;
|
||||
for (int i=0; i<64; i++) map2[map1[i]] = (byte)i; }
|
||||
|
||||
/**
|
||||
* Encodes a string into Base64 format.
|
||||
* No blanks or line breaks are inserted.
|
||||
* @param s A String to be encoded.
|
||||
* @return A String containing the Base64 encoded data.
|
||||
*/
|
||||
public static String encodeString (String s) {
|
||||
return new String(encode(s.getBytes())); }
|
||||
|
||||
/**
|
||||
* Encodes a byte array into Base 64 format and breaks the output into lines of 76 characters.
|
||||
* This method is compatible with <code>sun.misc.BASE64Encoder.encodeBuffer(byte[])</code>.
|
||||
* @param in An array containing the data bytes to be encoded.
|
||||
* @return A String containing the Base64 encoded data, broken into lines.
|
||||
*/
|
||||
public static String encodeLines (byte[] in) {
|
||||
return encodeLines(in, 0, in.length, 76, systemLineSeparator); }
|
||||
|
||||
/**
|
||||
* Encodes a byte array into Base 64 format and breaks the output into lines.
|
||||
* @param in An array containing the data bytes to be encoded.
|
||||
* @param iOff Offset of the first byte in <code>in</code> to be processed.
|
||||
* @param iLen Number of bytes to be processed in <code>in</code>, starting at <code>iOff</code>.
|
||||
* @param lineLen Line length for the output data. Should be a multiple of 4.
|
||||
* @param lineSeparator The line separator to be used to separate the output lines.
|
||||
* @return A String containing the Base64 encoded data, broken into lines.
|
||||
*/
|
||||
public static String encodeLines (byte[] in, int iOff, int iLen, int lineLen, String lineSeparator) {
|
||||
int blockLen = (lineLen*3) / 4;
|
||||
if (blockLen <= 0) throw new IllegalArgumentException();
|
||||
int lines = (iLen+blockLen-1) / blockLen;
|
||||
int bufLen = ((iLen+2)/3)*4 + lines*lineSeparator.length();
|
||||
StringBuilder buf = new StringBuilder(bufLen);
|
||||
int ip = 0;
|
||||
while (ip < iLen) {
|
||||
int l = Math.min(iLen-ip, blockLen);
|
||||
buf.append (encode(in, iOff+ip, l));
|
||||
buf.append (lineSeparator);
|
||||
ip += l; }
|
||||
return buf.toString(); }
|
||||
|
||||
/**
|
||||
* Encodes a byte array into Base64 format.
|
||||
* No blanks or line breaks are inserted in the output.
|
||||
* @param in An array containing the data bytes to be encoded.
|
||||
* @return A character array containing the Base64 encoded data.
|
||||
*/
|
||||
public static char[] encode (byte[] in) {
|
||||
return encode(in, 0, in.length); }
|
||||
|
||||
/**
|
||||
* Encodes a byte array into Base64 format.
|
||||
* No blanks or line breaks are inserted in the output.
|
||||
* @param in An array containing the data bytes to be encoded.
|
||||
* @param iLen Number of bytes to process in <code>in</code>.
|
||||
* @return A character array containing the Base64 encoded data.
|
||||
*/
|
||||
public static char[] encode (byte[] in, int iLen) {
|
||||
return encode(in, 0, iLen); }
|
||||
|
||||
/**
|
||||
* Encodes a byte array into Base64 format.
|
||||
* No blanks or line breaks are inserted in the output.
|
||||
* @param in An array containing the data bytes to be encoded.
|
||||
* @param iOff Offset of the first byte in <code>in</code> to be processed.
|
||||
* @param iLen Number of bytes to process in <code>in</code>, starting at <code>iOff</code>.
|
||||
* @return A character array containing the Base64 encoded data.
|
||||
*/
|
||||
public static char[] encode (byte[] in, int iOff, int iLen) {
|
||||
int oDataLen = (iLen*4+2)/3; // output length without padding
|
||||
int oLen = ((iLen+2)/3)*4; // output length including padding
|
||||
char[] out = new char[oLen];
|
||||
int ip = iOff;
|
||||
int iEnd = iOff + iLen;
|
||||
int op = 0;
|
||||
while (ip < iEnd) {
|
||||
int i0 = in[ip++] & 0xff;
|
||||
int i1 = ip < iEnd ? in[ip++] & 0xff : 0;
|
||||
int i2 = ip < iEnd ? in[ip++] & 0xff : 0;
|
||||
int o0 = i0 >>> 2;
|
||||
int o1 = ((i0 & 3) << 4) | (i1 >>> 4);
|
||||
int o2 = ((i1 & 0xf) << 2) | (i2 >>> 6);
|
||||
int o3 = i2 & 0x3F;
|
||||
out[op++] = map1[o0];
|
||||
out[op++] = map1[o1];
|
||||
out[op] = op < oDataLen ? map1[o2] : '='; op++;
|
||||
out[op] = op < oDataLen ? map1[o3] : '='; op++; }
|
||||
return out; }
|
||||
|
||||
/**
|
||||
* Decodes a string from Base64 format.
|
||||
* No blanks or line breaks are allowed within the Base64 encoded input data.
|
||||
* @param s A Base64 String to be decoded.
|
||||
* @return A String containing the decoded data.
|
||||
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
|
||||
*/
|
||||
public static String decodeString (String s) {
|
||||
return new String(decode(s)); }
|
||||
|
||||
/**
|
||||
* Decodes a byte array from Base64 format and ignores line separators, tabs and blanks.
|
||||
* CR, LF, Tab and Space characters are ignored in the input data.
|
||||
* This method is compatible with <code>sun.misc.BASE64Decoder.decodeBuffer(String)</code>.
|
||||
* @param s A Base64 String to be decoded.
|
||||
* @return An array containing the decoded data bytes.
|
||||
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
|
||||
*/
|
||||
public static byte[] decodeLines (String s) {
|
||||
char[] buf = new char[s.length()];
|
||||
int p = 0;
|
||||
for (int ip = 0; ip < s.length(); ip++) {
|
||||
char c = s.charAt(ip);
|
||||
if (c != ' ' && c != '\r' && c != '\n' && c != '\t')
|
||||
buf[p++] = c; }
|
||||
return decode(buf, 0, p); }
|
||||
|
||||
/**
|
||||
* Decodes a byte array from Base64 format.
|
||||
* No blanks or line breaks are allowed within the Base64 encoded input data.
|
||||
* @param s A Base64 String to be decoded.
|
||||
* @return An array containing the decoded data bytes.
|
||||
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
|
||||
*/
|
||||
public static byte[] decode (String s) {
|
||||
return decode(s.toCharArray()); }
|
||||
|
||||
/**
|
||||
* Decodes a byte array from Base64 format.
|
||||
* No blanks or line breaks are allowed within the Base64 encoded input data.
|
||||
* @param in A character array containing the Base64 encoded data.
|
||||
* @return An array containing the decoded data bytes.
|
||||
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
|
||||
*/
|
||||
public static byte[] decode (char[] in) {
|
||||
return decode(in, 0, in.length); }
|
||||
|
||||
/**
|
||||
* Decodes a byte array from Base64 format.
|
||||
* No blanks or line breaks are allowed within the Base64 encoded input data.
|
||||
* @param in A character array containing the Base64 encoded data.
|
||||
* @param iOff Offset of the first character in <code>in</code> to be processed.
|
||||
* @param iLen Number of characters to process in <code>in</code>, starting at <code>iOff</code>.
|
||||
* @return An array containing the decoded data bytes.
|
||||
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
|
||||
*/
|
||||
public static byte[] decode (char[] in, int iOff, int iLen) {
|
||||
if (iLen%4 != 0) throw new IllegalArgumentException ("Length of Base64 encoded input string is not a multiple of 4.");
|
||||
while (iLen > 0 && in[iOff+iLen-1] == '=') iLen--;
|
||||
int oLen = (iLen*3) / 4;
|
||||
byte[] out = new byte[oLen];
|
||||
int ip = iOff;
|
||||
int iEnd = iOff + iLen;
|
||||
int op = 0;
|
||||
while (ip < iEnd) {
|
||||
int i0 = in[ip++];
|
||||
int i1 = in[ip++];
|
||||
int i2 = ip < iEnd ? in[ip++] : 'A';
|
||||
int i3 = ip < iEnd ? in[ip++] : 'A';
|
||||
if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127)
|
||||
throw new IllegalArgumentException ("Illegal character in Base64 encoded data.");
|
||||
int b0 = map2[i0];
|
||||
int b1 = map2[i1];
|
||||
int b2 = map2[i2];
|
||||
int b3 = map2[i3];
|
||||
if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0)
|
||||
throw new IllegalArgumentException ("Illegal character in Base64 encoded data.");
|
||||
int o0 = ( b0 <<2) | (b1>>>4);
|
||||
int o1 = ((b1 & 0xf)<<4) | (b2>>>2);
|
||||
int o2 = ((b2 & 3)<<6) | b3;
|
||||
out[op++] = (byte)o0;
|
||||
if (op<oLen) out[op++] = (byte)o1;
|
||||
if (op<oLen) out[op++] = (byte)o2; }
|
||||
return out; }
|
||||
|
||||
// Dummy constructor.
|
||||
private Base64Coder() {}
|
||||
|
||||
} // end class Base64Coder
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid;
|
||||
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.keepassdroid.stylish.StylishActivity;
|
||||
import com.kunzisoft.keepass.R;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
public class AboutActivity extends StylishActivity {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.about);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
toolbar.setTitle(getString(R.string.menu_about));
|
||||
setSupportActionBar(toolbar);
|
||||
assert getSupportActionBar() != null;
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
String version;
|
||||
try {
|
||||
PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
version = packageInfo.versionName;
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.w(getClass().getSimpleName(), "Unable to get application version", e);
|
||||
version = "Unable to get application version.";
|
||||
}
|
||||
version = getString(R.string.version_label) + " " + version;
|
||||
TextView versionText = (TextView) findViewById(R.id.activity_about_version);
|
||||
versionText.setText(version);
|
||||
|
||||
TextView disclaimerText = (TextView) findViewById(R.id.disclaimer);
|
||||
disclaimerText.setText(getString(R.string.disclaimer_formal, new DateTime().getYear()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
switch (id) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
break;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@@ -1,274 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.keepassdroid.utils.EmptyUtils;
|
||||
import com.keepassdroid.utils.UriUtil;
|
||||
import com.keepassdroid.view.KeyFileHelper;
|
||||
import com.kunzisoft.keepass.R;
|
||||
|
||||
public class AssignMasterKeyDialog extends DialogFragment {
|
||||
|
||||
private String masterPassword;
|
||||
private Uri mKeyfile;
|
||||
|
||||
private View rootView;
|
||||
private CompoundButton passwordCheckBox;
|
||||
private TextView passView;
|
||||
private TextView passConfView;
|
||||
private CompoundButton keyfileCheckBox;
|
||||
private TextView keyfileView;
|
||||
|
||||
private AssignPasswordDialogListener mListener;
|
||||
|
||||
private KeyFileHelper keyFileHelper;
|
||||
|
||||
public interface AssignPasswordDialogListener {
|
||||
void onAssignKeyDialogPositiveClick(boolean masterPasswordChecked, String masterPassword,
|
||||
boolean keyFileChecked, Uri keyFile);
|
||||
void onAssignKeyDialogNegativeClick(boolean masterPasswordChecked, String masterPassword,
|
||||
boolean keyFileChecked, Uri keyFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context activity) {
|
||||
super.onAttach(activity);
|
||||
try {
|
||||
mListener = (AssignPasswordDialogListener) activity;
|
||||
} catch (ClassCastException e) {
|
||||
throw new ClassCastException(activity.toString()
|
||||
+ " must implement " + AssignPasswordDialogListener.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
|
||||
rootView = inflater.inflate(R.layout.set_password, null);
|
||||
builder.setView(rootView)
|
||||
.setTitle(R.string.assign_master_key)
|
||||
// Add action buttons
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
}
|
||||
});
|
||||
|
||||
passwordCheckBox = (CompoundButton) rootView.findViewById(R.id.password_checkbox);
|
||||
passView = (TextView) rootView.findViewById(R.id.pass_password);
|
||||
passView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
passwordCheckBox.setChecked(true);
|
||||
}
|
||||
});
|
||||
passConfView = (TextView) rootView.findViewById(R.id.pass_conf_password);
|
||||
|
||||
keyfileCheckBox = (CompoundButton) rootView.findViewById(R.id.keyfile_checkox);
|
||||
keyfileView = (TextView) rootView.findViewById(R.id.pass_keyfile);
|
||||
keyfileView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
keyfileCheckBox.setChecked(true);
|
||||
}
|
||||
});
|
||||
|
||||
keyFileHelper = new KeyFileHelper(this);
|
||||
rootView.findViewById(R.id.browse_button)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
keyFileHelper.getOpenFileOnClickViewListener().onClick(view);
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(final DialogInterface dialog) {
|
||||
Button positiveButton = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_POSITIVE);
|
||||
positiveButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
|
||||
masterPassword = "";
|
||||
mKeyfile = null;
|
||||
|
||||
boolean error = verifyPassword() || verifyFile();
|
||||
|
||||
if (!passwordCheckBox.isChecked() && !keyfileCheckBox.isChecked()) {
|
||||
error = true;
|
||||
showNoKeyConfirmationDialog();
|
||||
}
|
||||
|
||||
if (!error) {
|
||||
mListener.onAssignKeyDialogPositiveClick(
|
||||
passwordCheckBox.isChecked(), masterPassword,
|
||||
keyfileCheckBox.isChecked(), mKeyfile);
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
});
|
||||
Button negativeButton = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_NEGATIVE);
|
||||
negativeButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
mListener.onAssignKeyDialogNegativeClick(
|
||||
passwordCheckBox.isChecked(), masterPassword,
|
||||
keyfileCheckBox.isChecked(), mKeyfile);
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
private boolean verifyPassword() {
|
||||
boolean error = false;
|
||||
if (passwordCheckBox.isChecked()) {
|
||||
masterPassword = passView.getText().toString();
|
||||
String confpass = passConfView.getText().toString();
|
||||
|
||||
// Verify that passwords match
|
||||
if (!masterPassword.equals(confpass)) {
|
||||
error = true;
|
||||
// Passwords do not match
|
||||
Toast.makeText(getContext(), R.string.error_pass_match, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
if (masterPassword == null || masterPassword.isEmpty()) {
|
||||
error = true;
|
||||
showEmptyPasswordConfirmationDialog();
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
private boolean verifyFile() {
|
||||
boolean error = false;
|
||||
if (keyfileCheckBox.isChecked()) {
|
||||
Uri keyfile = UriUtil.parseDefaultFile(keyfileView.getText().toString());
|
||||
mKeyfile = keyfile;
|
||||
|
||||
// Verify that a keyfile is set
|
||||
if (EmptyUtils.isNullOrEmpty(keyfile)) {
|
||||
error = true;
|
||||
Toast.makeText(getContext(), R.string.error_nokeyfile, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
private void showEmptyPasswordConfirmationDialog() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setMessage(R.string.warning_empty_password)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
if (!verifyFile()) {
|
||||
mListener.onAssignKeyDialogPositiveClick(
|
||||
passwordCheckBox.isChecked(), masterPassword,
|
||||
keyfileCheckBox.isChecked(), mKeyfile);
|
||||
AssignMasterKeyDialog.this.dismiss();
|
||||
}
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {}
|
||||
});
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
private void showNoKeyConfirmationDialog() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setMessage(R.string.warning_no_encryption_key)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
mListener.onAssignKeyDialogPositiveClick(
|
||||
passwordCheckBox.isChecked(), masterPassword,
|
||||
keyfileCheckBox.isChecked(), mKeyfile);
|
||||
AssignMasterKeyDialog.this.dismiss();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {}
|
||||
});
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
keyFileHelper.onActivityResultCallback(requestCode, resultCode, data,
|
||||
new KeyFileHelper.KeyFileCallback() {
|
||||
@Override
|
||||
public void onKeyFileResultCallback(Uri uri) {
|
||||
if(uri != null) {
|
||||
Uri pathString = UriUtil.parseDefaultFile(uri.toString());
|
||||
if (pathString != null) {
|
||||
keyfileCheckBox.setChecked(true);
|
||||
keyfileView.setText(pathString.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import com.keepassdroid.utils.UriUtil;
|
||||
import com.kunzisoft.keepass.R;
|
||||
import com.nononsenseapps.filepicker.FilePickerActivity;
|
||||
import com.nononsenseapps.filepicker.Utils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CreateFileDialog extends DialogFragment implements AdapterView.OnItemSelectedListener{
|
||||
|
||||
private final int FILE_CODE = 3853;
|
||||
|
||||
private EditText folderPathView;
|
||||
private EditText fileNameView;
|
||||
private DefinePathDialogListener mListener;
|
||||
private String extension;
|
||||
|
||||
private Uri uriPath;
|
||||
|
||||
public interface DefinePathDialogListener {
|
||||
boolean onDefinePathDialogPositiveClick(Uri pathFile);
|
||||
boolean onDefinePathDialogNegativeClick(Uri pathFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context activity) {
|
||||
super.onAttach(activity);
|
||||
try {
|
||||
mListener = (DefinePathDialogListener) activity;
|
||||
} catch (ClassCastException e) {
|
||||
throw new ClassCastException(activity.toString()
|
||||
+ " must implement " + DefinePathDialogListener.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
|
||||
View rootView = inflater.inflate(R.layout.file_creation, null);
|
||||
builder.setView(rootView)
|
||||
.setTitle(R.string.create_keepass_file)
|
||||
// Add action buttons
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {}
|
||||
});
|
||||
|
||||
// Folder selection
|
||||
View browseView = rootView.findViewById(R.id.browse_button);
|
||||
folderPathView = (EditText) rootView.findViewById(R.id.folder_path);
|
||||
fileNameView = (EditText) rootView.findViewById(R.id.filename);
|
||||
String defaultPath = Environment.getExternalStorageDirectory().getPath()
|
||||
+ getString(R.string.database_file_path_default);
|
||||
folderPathView.setText(defaultPath);
|
||||
browseView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent i = new Intent(getContext(), FilePickerStylishActivity.class);
|
||||
i.putExtra(FilePickerActivity.EXTRA_ALLOW_MULTIPLE, false);
|
||||
i.putExtra(FilePickerActivity.EXTRA_ALLOW_CREATE_DIR, true);
|
||||
i.putExtra(FilePickerActivity.EXTRA_MODE, FilePickerActivity.MODE_DIR);
|
||||
i.putExtra(FilePickerActivity.EXTRA_START_PATH,
|
||||
Environment.getExternalStorageDirectory().getPath());
|
||||
startActivityForResult(i, FILE_CODE);
|
||||
}
|
||||
});
|
||||
|
||||
// Init path
|
||||
uriPath = null;
|
||||
|
||||
// Extension
|
||||
extension = getString(R.string.database_file_extension_default);
|
||||
Spinner spinner = (Spinner) rootView.findViewById(R.id.file_types);
|
||||
spinner.setOnItemSelectedListener(this);
|
||||
|
||||
// Spinner Drop down elements
|
||||
String[] fileTypes = getResources().getStringArray(R.array.file_types);
|
||||
ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, fileTypes);
|
||||
dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
spinner.setAdapter(dataAdapter);
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(final DialogInterface dialog) {
|
||||
Button positiveButton = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_POSITIVE);
|
||||
positiveButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
if(mListener.onDefinePathDialogPositiveClick(buildPath()))
|
||||
CreateFileDialog.this.dismiss();
|
||||
}
|
||||
});
|
||||
Button negativeButton = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_NEGATIVE);
|
||||
negativeButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
if(mListener.onDefinePathDialogNegativeClick(buildPath()))
|
||||
CreateFileDialog.this.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == FILE_CODE && resultCode == Activity.RESULT_OK) {
|
||||
uriPath = data.getData();
|
||||
if (uriPath != null) {
|
||||
File file = Utils.getFileForUri(uriPath);
|
||||
folderPathView.setText(file.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
|
||||
extension = adapterView.getItemAtPosition(position).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
private Uri buildPath() {
|
||||
Uri path = new Uri.Builder().path(folderPathView.getText().toString())
|
||||
.appendPath(fileNameView.getText().toString() + extension)
|
||||
.build();
|
||||
path = UriUtil.translate(getContext(), path);
|
||||
return path;
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
|
||||
*
|
||||
* This file is part of KeePass DX.
|
||||
*
|
||||
* KeePass DX is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePass DX is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.keepassdroid.database.PwDatabase;
|
||||
import com.keepassdroid.database.PwDatabaseV3;
|
||||
import com.keepassdroid.database.PwGroup;
|
||||
import com.keepassdroid.database.exception.ContentFileNotFoundException;
|
||||
import com.keepassdroid.database.exception.InvalidDBException;
|
||||
import com.keepassdroid.database.exception.InvalidPasswordException;
|
||||
import com.keepassdroid.database.exception.PwDbOutputException;
|
||||
import com.keepassdroid.database.load.Importer;
|
||||
import com.keepassdroid.database.load.ImporterFactory;
|
||||
import com.keepassdroid.database.save.PwDbOutput;
|
||||
import com.keepassdroid.icons.DrawableFactory;
|
||||
import com.keepassdroid.search.SearchDbHelper;
|
||||
import com.keepassdroid.utils.UriUtil;
|
||||
import com.kunzisoft.keepass.R;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.SyncFailedException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author bpellin
|
||||
*/
|
||||
public class Database {
|
||||
public Set<PwGroup> dirty = new HashSet<PwGroup>();
|
||||
public PwDatabase pm;
|
||||
public Uri mUri;
|
||||
public SearchDbHelper searchHelper;
|
||||
public boolean readOnly = false;
|
||||
public boolean passwordEncodingError = false;
|
||||
|
||||
public DrawableFactory drawFactory = new DrawableFactory();
|
||||
|
||||
private boolean loaded = false;
|
||||
|
||||
public boolean Loaded() {
|
||||
return loaded;
|
||||
}
|
||||
|
||||
public void setLoaded() {
|
||||
loaded = true;
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, InputStream is, String password, InputStream keyInputStream) throws IOException, InvalidDBException {
|
||||
LoadData(ctx, is, password, keyInputStream, new UpdateStatus(), !Importer.DEBUG);
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, Uri uri, String password, Uri keyfile) throws IOException, FileNotFoundException, InvalidDBException {
|
||||
LoadData(ctx, uri, password, keyfile, new UpdateStatus(), !Importer.DEBUG);
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, Uri uri, String password, Uri keyfile, UpdateStatus status) throws IOException, FileNotFoundException, InvalidDBException {
|
||||
LoadData(ctx, uri, password, keyfile, status, !Importer.DEBUG);
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, Uri uri, String password, Uri keyfile, UpdateStatus status, boolean debug) throws IOException, FileNotFoundException, InvalidDBException {
|
||||
mUri = uri;
|
||||
readOnly = false;
|
||||
if (uri.getScheme().equals("file")) {
|
||||
File file = new File(uri.getPath());
|
||||
readOnly = !file.canWrite();
|
||||
}
|
||||
|
||||
try {
|
||||
passUrisAsInputStreams(ctx, uri, password, keyfile, status, debug, 0);
|
||||
} catch (InvalidPasswordException e) {
|
||||
// Retry with rounds fix
|
||||
try {
|
||||
passUrisAsInputStreams(ctx, uri, password, keyfile, status, debug, getFixRounds(ctx));
|
||||
} catch (Exception e2) {
|
||||
// Rethrow original exception
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private long getFixRounds(Context ctx) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
|
||||
return prefs.getLong(ctx.getString(R.string.roundsFix_key), ctx.getResources().getInteger(R.integer.roundsFix_default));
|
||||
}
|
||||
|
||||
|
||||
private void passUrisAsInputStreams(Context ctx, Uri uri, String password, Uri keyfile, UpdateStatus status, boolean debug, long roundsFix) throws IOException, FileNotFoundException, InvalidDBException {
|
||||
InputStream is, kfIs;
|
||||
try {
|
||||
is = UriUtil.getUriInputStream(ctx, uri);
|
||||
} catch (Exception e) {
|
||||
Log.e("KPD", "Database::LoadData", e);
|
||||
throw ContentFileNotFoundException.getInstance(uri);
|
||||
}
|
||||
|
||||
try {
|
||||
kfIs = UriUtil.getUriInputStream(ctx, keyfile);
|
||||
} catch (Exception e) {
|
||||
Log.e("KPD", "Database::LoadData", e);
|
||||
throw ContentFileNotFoundException.getInstance(keyfile);
|
||||
}
|
||||
LoadData(ctx, is, password, kfIs, status, debug, roundsFix);
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, InputStream is, String password, InputStream kfIs, boolean debug) throws IOException, InvalidDBException {
|
||||
LoadData(ctx, is, password, kfIs, new UpdateStatus(), debug);
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, InputStream is, String password, InputStream kfIs, UpdateStatus status, boolean debug) throws IOException, InvalidDBException {
|
||||
LoadData(ctx, is, password, kfIs, status, debug, 0);
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, InputStream is, String password, InputStream kfIs, UpdateStatus status, boolean debug, long roundsFix) throws IOException, InvalidDBException {
|
||||
BufferedInputStream bis = new BufferedInputStream(is);
|
||||
|
||||
if ( ! bis.markSupported() ) {
|
||||
throw new IOException("Input stream does not support mark.");
|
||||
}
|
||||
|
||||
// We'll end up reading 8 bytes to identify the header. Might as well use two extra.
|
||||
bis.mark(10);
|
||||
|
||||
Importer imp = ImporterFactory.createImporter(bis, debug);
|
||||
|
||||
bis.reset(); // Return to the start
|
||||
|
||||
pm = imp.openDatabase(bis, password, kfIs, status, roundsFix);
|
||||
if ( pm != null ) {
|
||||
PwGroup root = pm.rootGroup;
|
||||
pm.populateGlobals(root);
|
||||
LoadData(ctx, pm, password, kfIs, status);
|
||||
}
|
||||
loaded = true;
|
||||
}
|
||||
|
||||
public void LoadData(Context ctx, PwDatabase pm, String password, InputStream keyInputStream, UpdateStatus status) {
|
||||
if ( pm != null ) {
|
||||
passwordEncodingError = !pm.validatePasswordEncoding(password);
|
||||
}
|
||||
searchHelper = new SearchDbHelper(ctx);
|
||||
loaded = true;
|
||||
}
|
||||
|
||||
public PwGroup Search(String str) {
|
||||
if (searchHelper == null) { return null; }
|
||||
return searchHelper.search(this, str);
|
||||
}
|
||||
|
||||
public void SaveData(Context ctx) throws IOException, PwDbOutputException {
|
||||
SaveData(ctx, mUri);
|
||||
}
|
||||
|
||||
public void SaveData(Context ctx, Uri uri) throws IOException, PwDbOutputException {
|
||||
if (uri.getScheme().equals("file")) {
|
||||
String filename = uri.getPath();
|
||||
File tempFile = new File(filename + ".tmp");
|
||||
FileOutputStream fos = new FileOutputStream(tempFile);
|
||||
//BufferedOutputStream bos = new BufferedOutputStream(fos);
|
||||
|
||||
//PwDbV3Output pmo = new PwDbV3Output(pm, bos, App.getCalendar());
|
||||
PwDbOutput pmo = PwDbOutput.getInstance(pm, fos);
|
||||
pmo.output();
|
||||
//bos.flush();
|
||||
//bos.close();
|
||||
fos.close();
|
||||
|
||||
// Force data to disk before continuing
|
||||
try {
|
||||
fos.getFD().sync();
|
||||
} catch (SyncFailedException e) {
|
||||
// Ignore if fsync fails. We tried.
|
||||
}
|
||||
|
||||
File orig = new File(filename);
|
||||
|
||||
if (!tempFile.renameTo(orig)) {
|
||||
throw new IOException("Failed to store database.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
OutputStream os;
|
||||
try {
|
||||
os = ctx.getContentResolver().openOutputStream(uri);
|
||||
} catch (Exception e) {
|
||||
throw new IOException("Failed to store database.");
|
||||
}
|
||||
|
||||
PwDbOutput pmo = PwDbOutput.getInstance(pm, os);
|
||||
pmo.output();
|
||||
os.close();
|
||||
}
|
||||
mUri = uri;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
dirty.clear();
|
||||
drawFactory.clear();
|
||||
|
||||
pm = null;
|
||||
mUri = null;
|
||||
loaded = false;
|
||||
passwordEncodingError = false;
|
||||
}
|
||||
|
||||
public void markAllGroupsAsDirty() {
|
||||
for ( PwGroup group : pm.getGroups() ) {
|
||||
dirty.add(group);
|
||||
}
|
||||
|
||||
// TODO: This should probably be abstracted out
|
||||
// The root tree in v3 is not an 'official' tree
|
||||
if ( pm instanceof PwDatabaseV3 ) {
|
||||
dirty.add(pm.rootGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||