mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-03-30 15:08:32 +00:00
Compare commits
619 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
88310fe69d | ||
![]() |
c2526c8a88 | ||
![]() |
1848f51a4c | ||
![]() |
4762d2c762 | ||
![]() |
d5689894f6 | ||
![]() |
6d4a86295e | ||
![]() |
8a2062d342 | ||
![]() |
e9fe979649 | ||
![]() |
1ab6f27fc9 | ||
![]() |
a7660cc43b | ||
![]() |
b583bcad23 | ||
![]() |
a3a9e06802 | ||
![]() |
965e63b672 | ||
![]() |
96b13a468b | ||
![]() |
432856ff0e | ||
![]() |
b2bd8a0fdd | ||
![]() |
6db98f1e47 | ||
![]() |
8e5da78971 | ||
![]() |
a5d894f514 | ||
![]() |
a16160fc66 | ||
![]() |
abe750cf7c | ||
![]() |
2a8969b437 | ||
![]() |
bf85deedb8 | ||
![]() |
6c3b02872d | ||
![]() |
4d2d8740dc | ||
![]() |
bbdaad0cba | ||
![]() |
daeaf6b1da | ||
![]() |
67faffafff | ||
![]() |
f75447afaa | ||
![]() |
121b478312 | ||
![]() |
088d5f3638 | ||
![]() |
ac1bfc0d60 | ||
![]() |
287104aafb | ||
![]() |
2d65d1d553 | ||
![]() |
3f060660c2 | ||
![]() |
01b62399af | ||
![]() |
dd01ee00cb | ||
![]() |
a5645e1d6c | ||
![]() |
09800741f0 | ||
![]() |
31a7e2616b | ||
![]() |
42d504a69a | ||
![]() |
fb72ea449a | ||
![]() |
f9a3e54364 | ||
![]() |
d3e75de23d | ||
![]() |
12274a1543 | ||
![]() |
0138b69356 | ||
![]() |
821f260ba9 | ||
![]() |
09095ced4f | ||
![]() |
d7f5736d67 | ||
![]() |
693adb417e | ||
![]() |
013dffce70 | ||
![]() |
59c809c943 | ||
![]() |
4ddadd4f53 | ||
![]() |
ae5698c621 | ||
![]() |
4b017f6c67 | ||
![]() |
e924a50c31 | ||
![]() |
88f20974dd | ||
![]() |
05fbc63732 | ||
![]() |
3cdaab7894 | ||
![]() |
e58c02d5ee | ||
![]() |
a57bffc84a | ||
![]() |
5ee854140a | ||
![]() |
ada794cab6 | ||
![]() |
e80d71bdfc | ||
![]() |
e454faab0c | ||
![]() |
6ac17dc71c | ||
![]() |
148fff91e8 | ||
![]() |
ccb040ae96 | ||
![]() |
2b9a07e840 | ||
![]() |
0255fcba86 | ||
![]() |
f2818429db | ||
![]() |
8d8033383b | ||
![]() |
a3839f6db5 | ||
![]() |
1bcce67c68 | ||
![]() |
e7b7f6c6b1 | ||
![]() |
ab8445116c | ||
![]() |
f36be640cc | ||
![]() |
2f185481a7 | ||
![]() |
5fd7ef370f | ||
![]() |
79014f00f0 | ||
![]() |
5c583341d7 | ||
![]() |
db82968b48 | ||
![]() |
7698790d1c | ||
![]() |
bcaaa7e2d2 | ||
![]() |
fca699373a | ||
![]() |
efb0324330 | ||
![]() |
c0b35306cb | ||
![]() |
35a1e1f23b | ||
![]() |
b9c5c8df59 | ||
![]() |
857b794e13 | ||
![]() |
00e147f5c1 | ||
![]() |
42938c871a | ||
![]() |
40b6427658 | ||
![]() |
f729d2bfa7 | ||
![]() |
5268c484e9 | ||
![]() |
9efdaf14b1 | ||
![]() |
8d11c5fd0f | ||
![]() |
7af16be62b | ||
![]() |
4026e24585 | ||
![]() |
a0337780b7 | ||
![]() |
3eba29dba8 | ||
![]() |
12fb916360 | ||
![]() |
cf94380e26 | ||
![]() |
52611e7f26 | ||
![]() |
f8d0e6052f | ||
![]() |
08b71487c5 | ||
![]() |
75f10955e6 | ||
![]() |
1ce2df1119 | ||
![]() |
6ace4a00f5 | ||
![]() |
9f5ff66c3d | ||
![]() |
b1e27a1430 | ||
![]() |
a315c46583 | ||
![]() |
d138b5290b | ||
![]() |
1d732c34ff | ||
![]() |
6a306a1797 | ||
![]() |
676c31b748 | ||
![]() |
727c7cad37 | ||
![]() |
ad7165dfd0 | ||
![]() |
cf0285add5 | ||
![]() |
90495522f7 | ||
![]() |
2985b0f470 | ||
![]() |
5bfff907b4 | ||
![]() |
ec52bdea83 | ||
![]() |
d1a24d1758 | ||
![]() |
7e2ea3f871 | ||
![]() |
f3f1ab931b | ||
![]() |
2bf7c92469 | ||
![]() |
5464caa6f7 | ||
![]() |
231fbbe8ca | ||
![]() |
9a53ac15df | ||
![]() |
a05c23b507 | ||
![]() |
90c8fbbf00 | ||
![]() |
e9e843280b | ||
![]() |
c68bd960ce | ||
![]() |
aa222fecb2 | ||
![]() |
6ebd179ed5 | ||
![]() |
2574795d37 | ||
![]() |
b41298a3f6 | ||
![]() |
cb97c8fcb9 | ||
![]() |
aba61efa70 | ||
![]() |
147d043a32 | ||
![]() |
df59dec319 | ||
![]() |
f5cebfe6fd | ||
![]() |
15adf84a7d | ||
![]() |
d4fd9c8d43 | ||
![]() |
151f15e282 | ||
![]() |
a6283e64cc | ||
![]() |
9c75845944 | ||
![]() |
db15f6d6a1 | ||
![]() |
026b348cf8 | ||
![]() |
711c41826a | ||
![]() |
a4e2c56c49 | ||
![]() |
7a6b41fbd4 | ||
![]() |
17bbab44c9 | ||
![]() |
b413a113f9 | ||
![]() |
280828dae6 | ||
![]() |
3320eaccb2 | ||
![]() |
22c2682574 | ||
![]() |
f64dc3f35f | ||
![]() |
6370e0b2d3 | ||
![]() |
6bfb557ca6 | ||
![]() |
959956cfc9 | ||
![]() |
99899d1d5c | ||
![]() |
591b9399a8 | ||
![]() |
f77da9cdb0 | ||
![]() |
19cb6ee521 | ||
![]() |
e92b44bc84 | ||
![]() |
c754fac10f | ||
![]() |
90a2af9fe2 | ||
![]() |
ff4181ad5a | ||
![]() |
e93702bb8d | ||
![]() |
54fc2c8fbd | ||
![]() |
7881b850ec | ||
![]() |
0da131cd9a | ||
![]() |
30635c72e8 | ||
![]() |
917faa56f5 | ||
![]() |
690346a854 | ||
![]() |
9a547b4553 | ||
![]() |
86f5a8b71b | ||
![]() |
4ee9deae62 | ||
![]() |
9e1962f006 | ||
![]() |
5456211266 | ||
![]() |
a56a4a16e8 | ||
![]() |
7295a2e7b3 | ||
![]() |
909d44f436 | ||
![]() |
a9fae5ff12 | ||
![]() |
01df8ca889 | ||
![]() |
d6d8576700 | ||
![]() |
c7efef60ac | ||
![]() |
7c2248151d | ||
![]() |
360a44f57b | ||
![]() |
0b7a5f69fa | ||
![]() |
24c644207d | ||
![]() |
1509364a49 | ||
![]() |
2afa19db01 | ||
![]() |
d291ce6d0f | ||
![]() |
089a14f9e0 | ||
![]() |
56cd448a32 | ||
![]() |
1ebf7034f5 | ||
![]() |
105b3cdde4 | ||
![]() |
97ebd14829 | ||
![]() |
53e1ec023f | ||
![]() |
8fe04c99c6 | ||
![]() |
278a61adab | ||
![]() |
1423bdd564 | ||
![]() |
79b3687424 | ||
![]() |
1ddf4e151c | ||
![]() |
af96628855 | ||
![]() |
0b8501427b | ||
![]() |
95fd04db8e | ||
![]() |
21343f2bb8 | ||
![]() |
33af3debc4 | ||
![]() |
0e08abb3e2 | ||
![]() |
7e382e6e43 | ||
![]() |
f77ed0c0ed | ||
![]() |
e5fe84dc2e | ||
![]() |
6ae87b9208 | ||
![]() |
9d85938ed7 | ||
![]() |
939622e827 | ||
![]() |
6f1eb06119 | ||
![]() |
5391bcc1bc | ||
![]() |
f21e327e69 | ||
![]() |
2419e6b4c5 | ||
![]() |
762775bc03 | ||
![]() |
b077504b3c | ||
![]() |
5008f07808 | ||
![]() |
b6dc112eb3 | ||
![]() |
5078b8a66d | ||
![]() |
bafdab20cf | ||
![]() |
3ea21f6c6a | ||
![]() |
091be036f4 | ||
![]() |
71ac6aff2f | ||
![]() |
a5f1ab8a1c | ||
![]() |
8816bd7541 | ||
![]() |
31c2a2575d | ||
![]() |
4521de2bea | ||
![]() |
538b5b6304 | ||
![]() |
97b73489d1 | ||
![]() |
6ef4392fb1 | ||
![]() |
e07a0c432a | ||
![]() |
7c9549ce88 | ||
![]() |
b3ef95e60e | ||
![]() |
b3574d6b3e | ||
![]() |
6d477ea509 | ||
![]() |
2377b2958d | ||
![]() |
21a6d83ec8 | ||
![]() |
0b2767fe4c | ||
![]() |
1aefed9602 | ||
![]() |
b094274d98 | ||
![]() |
ae4ed1fbf3 | ||
![]() |
d49d92e5cb | ||
![]() |
3520a357f5 | ||
![]() |
ebf22f2ee7 | ||
![]() |
204f32791d | ||
![]() |
e1ba0b2373 | ||
![]() |
95c73738fa | ||
![]() |
de5549ff69 | ||
![]() |
cec4e029f0 | ||
![]() |
7003d19c71 | ||
![]() |
111132238d | ||
![]() |
fe420d0bf9 | ||
![]() |
410dbcf1d5 | ||
![]() |
96d6e76c05 | ||
![]() |
ed482a17c5 | ||
![]() |
99ba76c695 | ||
![]() |
a12ca976a0 | ||
![]() |
c0f57dffb2 | ||
![]() |
b6fbab0443 | ||
![]() |
1fd9d2f0c5 | ||
![]() |
01b02d6092 | ||
![]() |
5b283550b7 | ||
![]() |
d6145ac73e | ||
![]() |
f90c53ae65 | ||
![]() |
2ba8229d23 | ||
![]() |
5d02e3a03e | ||
![]() |
6b43e02a25 | ||
![]() |
11b59994cf | ||
![]() |
4df86e53a7 | ||
![]() |
8d4dd349ae | ||
![]() |
5ae2846d97 | ||
![]() |
b164190f6a | ||
![]() |
ef953ce81e | ||
![]() |
ee4ad89451 | ||
![]() |
1c07d268b8 | ||
![]() |
3f44082457 | ||
![]() |
b6170aa40d | ||
![]() |
32caf41929 | ||
![]() |
f5b5b73f07 | ||
![]() |
9ed1135d74 | ||
![]() |
de2ffaf8e5 | ||
![]() |
d72cece54a | ||
![]() |
400b163f84 | ||
![]() |
33c19542af | ||
![]() |
1eb0b42387 | ||
![]() |
29d2b701c9 | ||
![]() |
785d24d0d2 | ||
![]() |
726ee55de4 | ||
![]() |
ac223bb8a6 | ||
![]() |
e63ab3db4f | ||
![]() |
0d025d8c3d | ||
![]() |
f72e34fefa | ||
![]() |
c60f2e3490 | ||
![]() |
bb0c1f8a08 | ||
![]() |
8ffd7aa1d4 | ||
![]() |
94868e606a | ||
![]() |
705f238e1e | ||
![]() |
1b17132631 | ||
![]() |
080b49a4ce | ||
![]() |
0ffcc4970f | ||
![]() |
66844826c6 | ||
![]() |
dcd28fadc6 | ||
![]() |
18333999a2 | ||
![]() |
b083e1d067 | ||
![]() |
5b92b80f79 | ||
![]() |
3e6e8d03a4 | ||
![]() |
71fef439ed | ||
![]() |
0307111993 | ||
![]() |
64ca5af879 | ||
![]() |
70778bc4c4 | ||
![]() |
911e0f5330 | ||
![]() |
fbd71f8dfe | ||
![]() |
809deee3a6 | ||
![]() |
375b03dcd4 | ||
![]() |
3a6e2d1661 | ||
![]() |
2e4e05369c | ||
![]() |
126ab53840 | ||
![]() |
9175b76887 | ||
![]() |
50ea1ac889 | ||
![]() |
4dbfcc5043 | ||
![]() |
7a1a67c718 | ||
![]() |
2bc07996fa | ||
![]() |
4379bfb7ec | ||
![]() |
2f8a8c1c9a | ||
![]() |
04488af790 | ||
![]() |
9a935ed559 | ||
![]() |
5957bab2e2 | ||
![]() |
d0be98feb9 | ||
![]() |
9f3985d398 | ||
![]() |
000e1335a2 | ||
![]() |
5e6dd8b1ed | ||
![]() |
4d2cf85a51 | ||
![]() |
93644b7c58 | ||
![]() |
ca60884c05 | ||
![]() |
50fa974dcc | ||
![]() |
08eef424a0 | ||
![]() |
dc85a5088f | ||
![]() |
e862d5f20b | ||
![]() |
bd1a7db46f | ||
![]() |
dd2aa7c5ec | ||
![]() |
5c02953b1c | ||
![]() |
04e806e0b4 | ||
![]() |
e69d8b24fc | ||
![]() |
449ec3a367 | ||
![]() |
b677ab5949 | ||
![]() |
6c32b62ef3 | ||
![]() |
ef066183dd | ||
![]() |
a822dd817b | ||
![]() |
775dade80f | ||
![]() |
cb8901c16d | ||
![]() |
4713282bb1 | ||
![]() |
d677c30359 | ||
![]() |
36985c92dc | ||
![]() |
2e867956eb | ||
![]() |
d89cc48bf3 | ||
![]() |
a1ef5f509f | ||
![]() |
7aaa34ddfc | ||
![]() |
e5c7c77362 | ||
![]() |
f93f59e2e5 | ||
![]() |
f54b133085 | ||
![]() |
255926ab19 | ||
![]() |
717f6bffe4 | ||
![]() |
917b5e51c2 | ||
![]() |
d5d8de36f5 | ||
![]() |
bd13edfc88 | ||
![]() |
22a68878e4 | ||
![]() |
a6c849166d | ||
![]() |
ce5174dd21 | ||
![]() |
d6139daa79 | ||
![]() |
6fc005f19c | ||
![]() |
2894b35d66 | ||
![]() |
9e547bf6e4 | ||
![]() |
6da1c53de7 | ||
![]() |
03fa68dbb6 | ||
![]() |
05e435aae7 | ||
![]() |
1d2093ab0a | ||
![]() |
a17a7200b8 | ||
![]() |
cfeef41d61 | ||
![]() |
88b1380a54 | ||
![]() |
b7527f7966 | ||
![]() |
421733e21b | ||
![]() |
df7e690469 | ||
![]() |
fc42c38706 | ||
![]() |
acafb28661 | ||
![]() |
4f1c474433 | ||
![]() |
a599638ce2 | ||
![]() |
3fa778abe2 | ||
![]() |
f57d3527d3 | ||
![]() |
f59b0dec60 | ||
![]() |
da60fa0047 | ||
![]() |
d9829fce06 | ||
![]() |
4b6189b91b | ||
![]() |
3cd61ff1b4 | ||
![]() |
7ebdd6a2a6 | ||
![]() |
1837077012 | ||
![]() |
5e997605b3 | ||
![]() |
85d129af77 | ||
![]() |
1ac71a94a5 | ||
![]() |
b604458ba8 | ||
![]() |
ce70484738 | ||
![]() |
53f54e1e19 | ||
![]() |
e450582888 | ||
![]() |
3886358592 | ||
![]() |
ed8db3d31e | ||
![]() |
ab22fe86da | ||
![]() |
d238a023c1 | ||
![]() |
f50abd81a1 | ||
![]() |
40542fd08a | ||
![]() |
b862e139fc | ||
![]() |
b76236755a | ||
![]() |
a9252c6649 | ||
![]() |
619d02d78c | ||
![]() |
bccdabbc45 | ||
![]() |
1166de205c | ||
![]() |
e785df4c8f | ||
![]() |
b4e53b3ff7 | ||
![]() |
df2240ba08 | ||
![]() |
1484df9b8f | ||
![]() |
ead266507e | ||
![]() |
0e088aec28 | ||
![]() |
ab7dedf0a5 | ||
![]() |
12e5c96607 | ||
![]() |
1bff8aad50 | ||
![]() |
1836c40468 | ||
![]() |
0ca83cf121 | ||
![]() |
5ae7fc4444 | ||
![]() |
f028026217 | ||
![]() |
3349fab89e | ||
![]() |
6299c6dd77 | ||
![]() |
93b77669bc | ||
![]() |
31fe960261 | ||
![]() |
02a1ed2d78 | ||
![]() |
247ad58344 | ||
![]() |
aeddac438e | ||
![]() |
2d07c43030 | ||
![]() |
28c5902419 | ||
![]() |
0654bbe505 | ||
![]() |
39aa742c7a | ||
![]() |
2e19f1401c | ||
![]() |
5016cd5677 | ||
![]() |
5299561aa3 | ||
![]() |
e3cfa4f9dd | ||
![]() |
b8c07d6343 | ||
![]() |
eb496d2018 | ||
![]() |
e1fc91958c | ||
![]() |
e7594f7d6a | ||
![]() |
e599cee6c8 | ||
![]() |
91bd9e2c15 | ||
![]() |
18ec54bf4b | ||
![]() |
940ebba54f | ||
![]() |
97e9cdefe9 | ||
![]() |
06aef92752 | ||
![]() |
ff8d274b4d | ||
![]() |
6cff19c44a | ||
![]() |
8a57246ec4 | ||
![]() |
3e808c1578 | ||
![]() |
eba791e11e | ||
![]() |
43fb58404d | ||
![]() |
4379d1856e | ||
![]() |
b9134ed161 | ||
![]() |
6e2a787ff8 | ||
![]() |
f41412a5a2 | ||
![]() |
30ddc3b90a | ||
![]() |
3f494ca797 | ||
![]() |
4a8fffdfdf | ||
![]() |
8e5fe1da4f | ||
![]() |
7203e6afb6 | ||
![]() |
43f0724aeb | ||
![]() |
fa3c36fc87 | ||
![]() |
e959602a94 | ||
![]() |
9bb65bd1c3 | ||
![]() |
9e85f75519 | ||
![]() |
2ba04d9f0a | ||
![]() |
174086a011 | ||
![]() |
21e3ba4653 | ||
![]() |
e2eadd09e4 | ||
![]() |
a50cb9c6b7 | ||
![]() |
365a5efb63 | ||
![]() |
ab419179bc | ||
![]() |
3a42b45ab7 | ||
![]() |
636c7cf529 | ||
![]() |
7f37a8aaca | ||
![]() |
15ee659c9c | ||
![]() |
2000388a80 | ||
![]() |
ca248ba1a8 | ||
![]() |
95dd81381f | ||
![]() |
e1307b88d0 | ||
![]() |
9ae0aae7a2 | ||
![]() |
b6edfe646b | ||
![]() |
8f8517702e | ||
![]() |
4bff80bc9c | ||
![]() |
ce983e5a2d | ||
![]() |
01be7b7ec1 | ||
![]() |
051f5ec8cf | ||
![]() |
ca092c7cd0 | ||
![]() |
66c06dab3e | ||
![]() |
c23ed58387 | ||
![]() |
724775816f | ||
![]() |
92887a0948 | ||
![]() |
801430f969 | ||
![]() |
2ee36c2984 | ||
![]() |
89f738da45 | ||
![]() |
286d991265 | ||
![]() |
c34dede6de | ||
![]() |
4efeac3ad1 | ||
![]() |
c5aa647e31 | ||
![]() |
fe51f97b79 | ||
![]() |
4c15724caf | ||
![]() |
c2146ce165 | ||
![]() |
1f1ffedaf4 | ||
![]() |
2382482090 | ||
![]() |
479d826533 | ||
![]() |
ad7d654f2b | ||
![]() |
6df714a708 | ||
![]() |
86238e714e | ||
![]() |
331a0c27a9 | ||
![]() |
d5dd247b2c | ||
![]() |
400ae63c5e | ||
![]() |
a620fc0276 | ||
![]() |
b3e08fdc26 | ||
![]() |
f276e1ef51 | ||
![]() |
3a75eadaa0 | ||
![]() |
8854b097b4 | ||
![]() |
fe2949f16d | ||
![]() |
8d67af729a | ||
![]() |
10aa1aa5cb | ||
![]() |
f6ee6e959e | ||
![]() |
b9afd26912 | ||
![]() |
6a607c7567 | ||
![]() |
17fc32ba51 | ||
![]() |
aea7aa953a | ||
![]() |
fb3d23427d | ||
![]() |
c20b75252b | ||
![]() |
6a3d04ade6 | ||
![]() |
6516602d7b | ||
![]() |
8457639004 | ||
![]() |
f3b16386dc | ||
![]() |
7dbd393071 | ||
![]() |
f936abec9d | ||
![]() |
4edd85be69 | ||
![]() |
4f77990859 | ||
![]() |
89923dad17 | ||
![]() |
175eac5670 | ||
![]() |
ed9a029fcf | ||
![]() |
defa1283cb | ||
![]() |
0c5598a0fc | ||
![]() |
cde282d4f1 | ||
![]() |
5b148089c3 | ||
![]() |
0e33e641af | ||
![]() |
c48070def6 | ||
![]() |
bdad8e3eec | ||
![]() |
064e813f3f | ||
![]() |
6e648b1cbc | ||
![]() |
ad33660da8 | ||
![]() |
e16807505f | ||
![]() |
d415bc2546 | ||
![]() |
63b6d215e3 | ||
![]() |
8823603396 | ||
![]() |
85d0358d45 | ||
![]() |
20950e5df5 | ||
![]() |
5ad19c8da8 | ||
![]() |
4c93abb9f9 | ||
![]() |
a7640bce52 | ||
![]() |
ec720cc096 | ||
![]() |
2bc24f354b | ||
![]() |
3817cca3c6 | ||
![]() |
76a8f11780 | ||
![]() |
9394fec1f4 | ||
![]() |
29f29f6c6e | ||
![]() |
35c13212dd | ||
![]() |
ef7c38860b | ||
![]() |
be7b174df4 | ||
![]() |
a9a9a90ae2 | ||
![]() |
3a84442b5f | ||
![]() |
2fffc76060 | ||
![]() |
430145a8b1 | ||
![]() |
37d30c5003 | ||
![]() |
95eb43a3c2 | ||
![]() |
08d6b276e3 | ||
![]() |
7225251af8 | ||
![]() |
1f237e6a9c | ||
![]() |
38ec5314d4 | ||
![]() |
d5373ef361 | ||
![]() |
21f4ba46f8 | ||
![]() |
a4b56c944a | ||
![]() |
08fc7b32ca | ||
![]() |
929b016948 | ||
![]() |
aa89893773 | ||
![]() |
2eab8a1ebc | ||
![]() |
cc1bdcbae8 | ||
![]() |
2e26509723 | ||
![]() |
0712e8af2d | ||
![]() |
25bf080871 | ||
![]() |
e29de76dc1 | ||
![]() |
34b0928cca | ||
![]() |
14f244a80f | ||
![]() |
de360e200c | ||
![]() |
8783caa828 | ||
![]() |
5801169432 | ||
![]() |
20c468cbd7 | ||
![]() |
3218f7b7f8 | ||
![]() |
1c41c72520 | ||
![]() |
4af9b51915 | ||
![]() |
00c5f38689 | ||
![]() |
6988fdfee1 | ||
![]() |
35b0012f2f | ||
![]() |
320efc2435 | ||
![]() |
1b91d428f0 | ||
![]() |
2c6cbc4cb2 | ||
![]() |
5d71ae8691 |
@ -1,14 +0,0 @@
|
||||
---
|
||||
engines:
|
||||
duplication:
|
||||
enabled: true
|
||||
config:
|
||||
languages:
|
||||
- javascript
|
||||
eslint:
|
||||
enabled: true
|
||||
fixme:
|
||||
enabled: true
|
||||
ratings:
|
||||
paths:
|
||||
- "lib/**/*"
|
@ -1 +1,4 @@
|
||||
src/compression
|
||||
dist
|
||||
test/lib/
|
||||
test/typescript/
|
||||
docs
|
||||
|
142
.eslintrc.cjs
Normal file
142
.eslintrc.cjs
Normal file
@ -0,0 +1,142 @@
|
||||
module.exports = {
|
||||
'extends': [
|
||||
'airbnb-base',
|
||||
'airbnb-typescript/base'
|
||||
],
|
||||
|
||||
'parser': '@typescript-eslint/parser',
|
||||
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 11,
|
||||
'sourceType': 'module',
|
||||
'project': 'tsconfig.json'
|
||||
},
|
||||
|
||||
'env': {
|
||||
'browser': true,
|
||||
'es6': true,
|
||||
'node': true
|
||||
},
|
||||
|
||||
'plugins': [
|
||||
'@typescript-eslint',
|
||||
'chai-friendly',
|
||||
'import',
|
||||
'unicorn'
|
||||
],
|
||||
|
||||
'settings': {
|
||||
'import/resolver': {
|
||||
'typescript': {}
|
||||
}
|
||||
},
|
||||
|
||||
'globals': { // TODO are all these necessary?
|
||||
'globalThis': true,
|
||||
'console': true,
|
||||
'Promise': true,
|
||||
'importScripts': true,
|
||||
'process': true,
|
||||
'Event': true,
|
||||
'describe': true,
|
||||
'it': true,
|
||||
'mocha': true,
|
||||
'before': true,
|
||||
'beforeEach': true,
|
||||
'after': true,
|
||||
'afterEach': true,
|
||||
'escape': true,
|
||||
'unescape': true,
|
||||
'resolves': true,
|
||||
'rejects': true,
|
||||
'TransformStream': true,
|
||||
'BigInt': true
|
||||
},
|
||||
|
||||
'rules': {
|
||||
'arrow-body-style': 'off',
|
||||
'arrow-parens': ['error','as-needed'],
|
||||
'class-methods-use-this': 'off',
|
||||
'@typescript-eslint/comma-dangle': ['error', 'never'],
|
||||
'@typescript-eslint/comma-spacing': 'off',
|
||||
'consistent-return': 'off',
|
||||
'default-case': 'off',
|
||||
'@typescript-eslint/default-param-last': 'off',
|
||||
'eol-last': ['error', 'always'],
|
||||
'function-call-argument-newline': 'off',
|
||||
'func-names': ['error', 'never'],
|
||||
'function-paren-newline': 'off',
|
||||
'global-require': 'off',
|
||||
'key-spacing': 'off',
|
||||
'keyword-spacing': 'error',
|
||||
'max-classes-per-file': 'off',
|
||||
'max-len': 'off',
|
||||
'newline-per-chained-call': 'off',
|
||||
'no-bitwise': 'off',
|
||||
'no-continue': 'off',
|
||||
'no-else-return': 'off',
|
||||
'no-empty': ['error', { 'allowEmptyCatch': true }],
|
||||
'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF':0 }],
|
||||
'no-nested-ternary': 'off',
|
||||
'no-param-reassign': 'off', // TODO get rid of this
|
||||
'no-plusplus': 'off',
|
||||
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
|
||||
'object-curly-newline': 'off',
|
||||
'@typescript-eslint/no-shadow': 'off', // TODO get rid of this
|
||||
'object-property-newline': [
|
||||
'error',
|
||||
{
|
||||
'allowMultiplePropertiesPerLine': true
|
||||
}
|
||||
],
|
||||
'object-shorthand': 'off',
|
||||
'operator-assignment': 'off',
|
||||
'operator-linebreak': [
|
||||
'error',
|
||||
'after'
|
||||
],
|
||||
'padded-blocks': 'off',
|
||||
'prefer-arrow-callback': 'off',
|
||||
'prefer-destructuring': 'off',
|
||||
'prefer-rest-params': 'off', // TODO get rid of this
|
||||
'prefer-spread': 'off', // TODO get rid of this
|
||||
'prefer-template': 'off',
|
||||
'quote-props': 'off',
|
||||
'quotes': ['error', 'single', { 'avoidEscape': true }],
|
||||
'@typescript-eslint/space-before-function-paren': ['error', { 'anonymous': 'ignore', 'named': 'never', 'asyncArrow': 'always' }],
|
||||
'spaced-comment': 'off',
|
||||
'indent': 'off',
|
||||
'@typescript-eslint/indent': ['error', 2, { 'SwitchCase': 1 }],
|
||||
'no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'error',
|
||||
|
||||
// eslint-plugin-import rules:
|
||||
'import/named': 'error',
|
||||
'import/extensions': 'off', // temporary: we use them in tests (ESM compliant), but not in the lib (to limit diff)
|
||||
'import/first': 'off',
|
||||
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true, 'optionalDependencies': false, 'peerDependencies': false }],
|
||||
'import/no-unassigned-import': 'error',
|
||||
'import/no-unresolved': 'error',
|
||||
'import/prefer-default-export': 'off',
|
||||
|
||||
// Custom silencers:
|
||||
'no-multi-assign': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
'no-await-in-loop': 'off',
|
||||
'camelcase': 'off', // snake_case used in tests, need to fix separately
|
||||
'@typescript-eslint/naming-convention': 'off', // supersedes 'camelcase' rule
|
||||
'@typescript-eslint/lines-between-class-members': 'off',
|
||||
|
||||
// Custom errors:
|
||||
'@typescript-eslint/no-use-before-define': ['error', { 'functions': false, 'classes': true, 'variables': false, 'allowNamedExports': true }],
|
||||
'no-constant-condition': [2, { 'checkLoops': false }],
|
||||
'new-cap': [2, { 'properties': false, 'capIsNewExceptionPattern': 'EAX|OCB|GCM|CMAC|CBC|OMAC|CTR', 'newIsCapExceptionPattern': 'type|hash*' }],
|
||||
'max-lines': [2, { 'max': 620, 'skipBlankLines': true, 'skipComments': true }],
|
||||
'@typescript-eslint/no-unused-expressions': 0,
|
||||
'chai-friendly/no-unused-expressions': [2, { 'allowShortCircuit': true }],
|
||||
'unicorn/switch-case-braces': ['error', 'avoid'],
|
||||
|
||||
// Custom warnings:
|
||||
'no-console': 1
|
||||
}
|
||||
};
|
350
.eslintrc.js
350
.eslintrc.js
@ -1,350 +0,0 @@
|
||||
module.exports = {
|
||||
"extends": "airbnb-base",
|
||||
"parserOptions": { "sourceType": "module" },
|
||||
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
|
||||
"plugins": [
|
||||
"chai-friendly"
|
||||
],
|
||||
|
||||
"globals": { // TODO are all these necessary?
|
||||
"console": true,
|
||||
"Promise": true,
|
||||
"importScripts": true,
|
||||
"process": true,
|
||||
"Event": true,
|
||||
"describe": true,
|
||||
"it": true,
|
||||
"sinon": true,
|
||||
"mocha": true,
|
||||
"before": true,
|
||||
"beforeEach": true,
|
||||
"after": true,
|
||||
"afterEach": true,
|
||||
"escape": true,
|
||||
"unescape": true,
|
||||
"postMessage": true,
|
||||
"resolves": true,
|
||||
"rejects": true,
|
||||
"TransformStream": true
|
||||
},
|
||||
|
||||
"rules": {
|
||||
// Auto generated rules:
|
||||
"accessor-pairs": "error",
|
||||
"array-bracket-newline": "error",
|
||||
"array-bracket-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"array-callback-return": "error",
|
||||
"array-element-newline": "off",
|
||||
"arrow-body-style": "off",
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"block-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"brace-style": "off",
|
||||
"callback-return": "error",
|
||||
"camelcase": [
|
||||
"error",
|
||||
{
|
||||
"properties": "never"
|
||||
}
|
||||
],
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "error",
|
||||
"comma-dangle": [ "error", "never" ],
|
||||
"comma-spacing": "off",
|
||||
"comma-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"complexity": "off",
|
||||
"computed-property-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"consistent-return": "off",
|
||||
"consistent-this": "error",
|
||||
"curly": "error",
|
||||
"default-case": "off",
|
||||
"dot-location": "error",
|
||||
"dot-notation": [
|
||||
"error",
|
||||
{
|
||||
"allowKeywords": true
|
||||
}
|
||||
],
|
||||
"eol-last": ["error", "always"],
|
||||
"eqeqeq": "error",
|
||||
"for-direction": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"func-style": "off",
|
||||
"function-paren-newline": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"getter-return": "error",
|
||||
"global-require": "off",
|
||||
"guard-for-in": "off",
|
||||
"handle-callback-err": "error",
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"implicit-arrow-linebreak": [
|
||||
"error",
|
||||
"beside"
|
||||
],
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": "error",
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "error",
|
||||
"lines-between-class-members": "error",
|
||||
"max-depth": "off",
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "off",
|
||||
"multiline-comment-style": "off",
|
||||
"multiline-ternary": "off",
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-alert": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": "off",
|
||||
"no-buffer-constructor": "error",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-continue": "off",
|
||||
"no-div-regex": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": "off",
|
||||
"no-empty": [
|
||||
"error",
|
||||
{
|
||||
"allowEmptyCatch": true
|
||||
}
|
||||
],
|
||||
"no-empty-function": "off",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-extra-parens": "off",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-inner-declarations": [
|
||||
"error",
|
||||
"functions"
|
||||
],
|
||||
"no-invalid-this": "error",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-lonely-if": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-mixed-requires": "error",
|
||||
"no-multi-assign": "error",
|
||||
"no-multi-spaces": [
|
||||
"error",
|
||||
{
|
||||
"ignoreEOLComments": true
|
||||
}
|
||||
],
|
||||
"no-multi-str": "error",
|
||||
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF":0 }],
|
||||
"no-native-reassign": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-negated-in-lhs": "error",
|
||||
"no-nested-ternary": "off",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-object": "error",
|
||||
"no-new-require": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-proto": "error",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-restricted-globals": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-shadow": "off",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-sync": "error",
|
||||
"no-tabs": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-ternary": "off",
|
||||
"no-throw-literal": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "off",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": [
|
||||
"error",
|
||||
{
|
||||
"defaultAssignment": true
|
||||
}
|
||||
],
|
||||
"no-use-before-define": "off",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "off",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"nonblock-statement-body-position": "error",
|
||||
"object-curly-newline": "off",
|
||||
"object-curly-spacing": "error",
|
||||
"object-property-newline": [
|
||||
"error",
|
||||
{
|
||||
"allowMultiplePropertiesPerLine": true
|
||||
}
|
||||
],
|
||||
"object-shorthand": "off",
|
||||
"one-var-declaration-per-line": [
|
||||
"error",
|
||||
"initializations"
|
||||
],
|
||||
"operator-assignment": "off",
|
||||
"operator-linebreak": [
|
||||
"error",
|
||||
"after"
|
||||
],
|
||||
"padded-blocks": "off",
|
||||
"padding-line-between-statements": "error",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"prefer-spread": "off",
|
||||
"prefer-template": "off",
|
||||
"quote-props": "off",
|
||||
"quotes": "off",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"semi-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": false
|
||||
}
|
||||
],
|
||||
"semi-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"sort-imports": "off",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "off",
|
||||
"space-before-blocks": "off",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "off",
|
||||
"strict": "off",
|
||||
"switch-colon-spacing": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"wrap-iife": "error",
|
||||
"wrap-regex": "off",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"indent": [ "error", 2, { "SwitchCase": 1 } ],
|
||||
"no-buffer-constructor": "error",
|
||||
"no-lonely-if": "error",
|
||||
"no-unused-vars": "error",
|
||||
|
||||
// eslint-plugin-import rules:
|
||||
"import/extensions": "never",
|
||||
"import/no-extraneous-dependencies": ["error", {"devDependencies": true, "optionalDependencies": false, "peerDependencies": false}],
|
||||
|
||||
// Custom silencers:
|
||||
"camelcase": 0,
|
||||
"require-await": 0,
|
||||
"no-multi-assign": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"no-await-in-loop": 0,
|
||||
|
||||
// Custom errors:
|
||||
"no-undef": 2,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-mixed-operators": [ 2, {"groups": [["&", "|", "^", "~", "<<", ">>", ">>>"], ["&&", "||"]]}],
|
||||
"no-use-before-define": [ 2, { "functions": false, "classes": true, "variables": false }],
|
||||
"no-constant-condition": [ 2, { "checkLoops": false } ],
|
||||
"new-cap": [ 2, { "properties": false, "capIsNewExceptionPattern": "CMAC|CBC|OMAC|CTR", "newIsCapExceptionPattern": "type|hash*"}],
|
||||
"max-lines": [ 2, { "max": 550, "skipBlankLines": true, "skipComments": true } ],
|
||||
"no-unused-expressions": 0,
|
||||
"chai-friendly/no-unused-expressions": [ 2, { "allowShortCircuit": true } ],
|
||||
|
||||
// Custom warnings:
|
||||
"no-console": 1,
|
||||
}
|
||||
};
|
10
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report an issue with this library
|
||||
---
|
||||
<!-- Please search existing issues and discussions to avoid creating duplicates. -->
|
||||
|
||||
- OpenPGP.js version:
|
||||
- Affected platform (Browser or Node.js version):
|
||||
|
||||
<!-- Describe the bug you have encountered -->
|
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature request
|
||||
url: https://github.com/openpgpjs/openpgpjs/discussions/categories/ideas
|
||||
about: Suggest an idea for this project
|
||||
- name: Question
|
||||
url: https://github.com/openpgpjs/openpgpjs/discussions/categories/q-a
|
||||
about: Please ask any questions here
|
33
.github/dependabot.yml
vendored
Normal file
33
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
# The redundant target-branch directive is needed to set two different update schedules for npm,
|
||||
# working around a dependabot limitation:
|
||||
# see https://github.com/dependabot/dependabot-core/issues/1778#issuecomment-1988140219 .
|
||||
target-branch: main
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
allow:
|
||||
- dependency-name: "playwright"
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
allow:
|
||||
- dependency-name: "@noble*"
|
||||
- dependency-name: "fflate"
|
||||
versioning-strategy: increase
|
||||
groups:
|
||||
# Any packages matching the pattern @noble* where the highest resolvable
|
||||
# version is minor or patch will be grouped together.
|
||||
# Grouping rules apply to version updates only.
|
||||
noble:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "@noble*"
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
39
.github/test-suite/config.json.template
vendored
Normal file
39
.github/test-suite/config.json.template
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"drivers": [
|
||||
{
|
||||
"id": "sop-openpgpjs-branch",
|
||||
"path": "__SOP_OPENPGPJS__",
|
||||
"env": {
|
||||
"OPENPGPJS_PATH": "__OPENPGPJS_BRANCH__"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sop-openpgpjs-main",
|
||||
"path": "__SOP_OPENPGPJS__",
|
||||
"env": {
|
||||
"OPENPGPJS_PATH": "__OPENPGPJS_MAIN__",
|
||||
"DISABLE_PROFILES": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "__SQOP__"
|
||||
},
|
||||
{
|
||||
"path": "__GPGME_SOP__"
|
||||
},
|
||||
{
|
||||
"id": "gosop-v2",
|
||||
"path": "__GOSOP_V2__"
|
||||
},
|
||||
{
|
||||
"path": "__RNP_SOP__"
|
||||
},
|
||||
{
|
||||
"path": "__RSOP__"
|
||||
}
|
||||
],
|
||||
"rlimits": {
|
||||
"DATA": 1073741824
|
||||
}
|
||||
}
|
||||
|
14
.github/test-suite/prepare_config.sh
vendored
Executable file
14
.github/test-suite/prepare_config.sh
vendored
Executable file
@ -0,0 +1,14 @@
|
||||
CONFIG_TEMPLATE=$1
|
||||
CONFIG_OUTPUT=$2
|
||||
OPENPGPJS_BRANCH=$3
|
||||
OPENPGPJS_MAIN=$4
|
||||
cat $CONFIG_TEMPLATE \
|
||||
| sed "s@__OPENPGPJS_BRANCH__@${OPENPGPJS_BRANCH}@g" \
|
||||
| sed "s@__OPENPGPJS_MAIN__@${OPENPGPJS_MAIN}@g" \
|
||||
| sed "s@__SQOP__@${SQOP}@g" \
|
||||
| sed "s@__GPGME_SOP__@${GPGME_SOP}@g" \
|
||||
| sed "s@__GOSOP_V2__@${GOSOP_V2}@g" \
|
||||
| sed "s@__SOP_OPENPGPJS__@${SOP_OPENPGPJS_V2}@g" \
|
||||
| sed "s@__RNP_SOP__@${RNP_SOP}@g" \
|
||||
| sed "s@__RSOP__@${RSOP}@g" \
|
||||
> $CONFIG_OUTPUT
|
67
.github/workflows/benchmark.yml
vendored
Normal file
67
.github/workflows/benchmark.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Performance Regression Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
benchmark:
|
||||
name: Time and memory usage benchmark
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# check out pull request branch
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: pr
|
||||
# check out main branch (to compare performance)
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
path: main
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '>=20.6.0'
|
||||
|
||||
- name: Run pull request time benchmark
|
||||
run: cd pr && npm install && npm run --silent benchmark-time > benchmarks.txt && cat benchmarks.txt
|
||||
|
||||
- name: Run pull request memory usage benchmark
|
||||
run: cd pr && npm run --silent benchmark-memory-usage > memory_usage.txt && cat memory_usage.txt
|
||||
|
||||
- name: Run time benchmark on main (baseline)
|
||||
run: cd main && npm install && npm run --silent benchmark-time > benchmarks.txt && cat benchmarks.txt
|
||||
|
||||
- name: Run memory usage benchmark on main (baseline)
|
||||
run: cd main && npm run --silent benchmark-memory-usage > memory_usage.txt && cat memory_usage.txt
|
||||
|
||||
- name: Compare time benchmark result
|
||||
uses: openpgpjs/github-action-pull-request-benchmark@v1
|
||||
with:
|
||||
tool: 'benchmarkjs'
|
||||
name: 'Time benchmark'
|
||||
pr-benchmark-file-path: pr/benchmarks.txt
|
||||
base-benchmark-file-path: main/benchmarks.txt
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# trigger alert comment if 1.3 times slower
|
||||
alert-threshold: '130%'
|
||||
comment-on-alert: false
|
||||
# fail workdlow if 1.5 times slower
|
||||
fail-threshold: '150%'
|
||||
fail-on-alert: true
|
||||
file-to-annotate: ${{ github.workspace }}/test/benchmarks/time.js
|
||||
|
||||
- name: Compare memory usage benchmark result
|
||||
uses: openpgpjs/github-action-pull-request-benchmark@v1
|
||||
with:
|
||||
tool: 'raw'
|
||||
name: 'Memory usage benchmark'
|
||||
pr-benchmark-file-path: pr/memory_usage.txt
|
||||
base-benchmark-file-path: main/memory_usage.txt
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
alert-threshold: '102%'
|
||||
comment-on-alert: false
|
||||
fail-threshold: '110%'
|
||||
fail-on-alert: true
|
||||
file-to-annotate: ${{ github.workspace }}/test/benchmarks/memory_usage.js
|
||||
|
19
.github/workflows/docs.yml
vendored
Normal file
19
.github/workflows/docs.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: JSDoc
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- run: npm ci --ignore-scripts
|
||||
- run: npm run docs
|
87
.github/workflows/sop-test-suite.yml
vendored
Normal file
87
.github/workflows/sop-test-suite.yml
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
name: SOP interoperability test suite
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
|
||||
test-suite:
|
||||
name: Run interoperability test suite
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/protonmail/openpgp-interop-test-docker:v1.1.12
|
||||
credentials:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.github_token }}
|
||||
steps:
|
||||
# check out repo for scripts
|
||||
- uses: actions/checkout@v4
|
||||
# check out pull request branch
|
||||
- name: Checkout openpgpjs-branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: openpgpjs-branch
|
||||
- name: Install openpgpjs-branch
|
||||
run: cd openpgpjs-branch && npm install
|
||||
- name: Print openpgpjs-branch version
|
||||
run: $SOP_OPENPGPJS_V2 version --extended
|
||||
env:
|
||||
OPENPGPJS_PATH: ${{ github.workspace }}/openpgpjs-branch
|
||||
# check out main branch
|
||||
- name: Checkout openpgpjs-main
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
path: openpgpjs-main
|
||||
- name: Install openpgpjs-main
|
||||
run: cd openpgpjs-main && npm install
|
||||
- name: Print openpgpjs-main version
|
||||
run: $SOP_OPENPGPJS_V2 version --extended
|
||||
env:
|
||||
OPENPGPJS_PATH: ${{ github.workspace }}/openpgpjs-main
|
||||
# Run test suite
|
||||
- name: Prepare test configuration
|
||||
run: ./.github/test-suite/prepare_config.sh $CONFIG_TEMPLATE $CONFIG_OUTPUT $GITHUB_WORKSPACE/openpgpjs-branch $GITHUB_WORKSPACE/openpgpjs-main
|
||||
env:
|
||||
CONFIG_TEMPLATE: .github/test-suite/config.json.template
|
||||
CONFIG_OUTPUT: .github/test-suite/config.json
|
||||
- name: Display configuration
|
||||
run: cat .github/test-suite/config.json
|
||||
- name: Run interoperability test suite
|
||||
run: cd $TEST_SUITE_DIR && $TEST_SUITE --config $GITHUB_WORKSPACE/$CONFIG --json-out $GITHUB_WORKSPACE/$RESULTS_JSON --html-out $GITHUB_WORKSPACE/$RESULTS_HTML
|
||||
env:
|
||||
CONFIG: .github/test-suite/config.json
|
||||
RESULTS_JSON: .github/test-suite/test-suite-results.json
|
||||
RESULTS_HTML: .github/test-suite/test-suite-results.html
|
||||
# Upload results
|
||||
- name: Upload test results json artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-suite-results.json
|
||||
path: .github/test-suite/test-suite-results.json
|
||||
- name: Upload test results html artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-suite-results.html
|
||||
path: .github/test-suite/test-suite-results.html
|
||||
|
||||
compare-with-main:
|
||||
name: Compare with main
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-suite
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Download test results json artifact
|
||||
id: download-test-results
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-suite-results.json
|
||||
- name: Compare with baseline
|
||||
uses: ProtonMail/openpgp-interop-test-analyzer@v2
|
||||
with:
|
||||
results: ${{ steps.download-test-results.outputs.download-path }}/test-suite-results.json
|
||||
output: baseline-comparison.json
|
||||
baseline: sop-openpgpjs-main
|
||||
target: sop-openpgpjs-branch
|
206
.github/workflows/tests.yml
vendored
Normal file
206
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,206 @@
|
||||
name: Code Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build: # cache both dist and tests (non-lightweight only), based on commit hash
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Check for cached folders
|
||||
id: cache-full
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
test/lib
|
||||
key: cache-${{ github.sha }}
|
||||
- name: Build dist and tests
|
||||
if: steps.cache-full.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build-test
|
||||
|
||||
node:
|
||||
strategy:
|
||||
fail-fast: false # if tests for one version fail, continue with the rest
|
||||
matrix:
|
||||
node-version: [18.x, 20.x, 22.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
name: Node ${{ matrix.node-version }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci --ignore-scripts # for mocha
|
||||
- name: Retrieve cached folders
|
||||
uses: actions/cache/restore@v4
|
||||
id: cache-full
|
||||
with:
|
||||
# test/lib is not needed, but the path must be specified fully for a cache-hit
|
||||
path: |
|
||||
dist
|
||||
test/lib
|
||||
key: cache-${{ github.sha }}
|
||||
# ignore cache miss, since it was taken care of the `build` step and it should never occur here
|
||||
- run: npm test
|
||||
|
||||
test-browsers-latest:
|
||||
name: Browsers (latest)
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false # if tests for one version fail, continue with the rest
|
||||
matrix:
|
||||
# run on all main platforms to test platform-specific code, if present
|
||||
# (e.g. webkit's WebCrypto API implementation is different in macOS vs Linux)
|
||||
# TODO: windows-latest fails to fetch resources from the wtr server; investigate if the problem is with path declaration or permissions
|
||||
runner: ['ubuntu-latest', 'macos-latest']
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
|
||||
- name: Retrieve cached built folders
|
||||
uses: actions/cache/restore@v4
|
||||
id: cache-full
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
test/lib
|
||||
key: cache-${{ github.sha }}
|
||||
|
||||
- name: Install dependencies
|
||||
# cannot use `--ignore-scripts` since playwright seems to use it to set ENV vars
|
||||
run: |
|
||||
npm pkg delete scripts.prepare
|
||||
npm ci
|
||||
|
||||
- name: Get Playwright version and cache location
|
||||
id: playwright-version
|
||||
run: |
|
||||
PLAYWRIGHT_VERSION=$(npm ls playwright --depth=0 | grep playwright | sed 's/.*@//')
|
||||
echo "version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
|
||||
PLAYWRIGHT_CACHE=${{ fromJSON('{"ubuntu-latest": "~/.cache/ms-playwright", "macos-latest": "~/Library/Caches/ms-playwright"}')[matrix.runner] }}
|
||||
echo "playwright_cache=$PLAYWRIGHT_CACHE" >> $GITHUB_OUTPUT
|
||||
- name: Check for cached browsers
|
||||
id: cache-playwright-browsers
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.playwright-version.outputs.playwright_cache }}
|
||||
key: playwright-browsers-${{ matrix.runner }}-${{ steps.playwright-version.outputs.version }}
|
||||
- name: Install browsers
|
||||
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
npx playwright install --with-deps chromium
|
||||
npx playwright install --with-deps firefox
|
||||
|
||||
- name: Install WebKit # caching not possible, external shared libraries required
|
||||
if: ${{ matrix.runner == 'macos-latest' }} # do not install on ubuntu, since the X25519 WebCrypto implementation has issues
|
||||
run: npx playwright install --with-deps webkit
|
||||
|
||||
- name: Run browser tests
|
||||
run: npm run test-browser:ci -- --static-logging
|
||||
|
||||
- name: Run browser tests (lightweight) # overwrite test/lib
|
||||
run: |
|
||||
npm run build-test --lightweight
|
||||
npm run test-browser:ci -- --static-logging
|
||||
|
||||
test-browsers-compatibility:
|
||||
name: Browsers (older, on Browserstack)
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-browsers-latest
|
||||
env: # credentials need hardcoding for now since Github secrets aren't accessible on pull requests from forks
|
||||
BROWSERSTACK_USERNAME: openpgpjs_PlY4Uq885CQ
|
||||
BROWSERSTACK_ACCESS_KEY: VjgBVRMxNVBj7SjJFiau
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
|
||||
- name: Generate self-signed HTTPS certificates for web-test-runner server
|
||||
uses: kofemann/action-create-certificate@v0.0.4
|
||||
with:
|
||||
hostcert: '127.0.0.1.pem'
|
||||
hostkey: '127.0.0.1-key.pem'
|
||||
cachain: 'ca-chain.pem'
|
||||
- name: Adjust HTTPS certificates permissions
|
||||
run: sudo chown runner:docker *.pem
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --ignore-scripts
|
||||
|
||||
- name: Retrieve cached dist folder
|
||||
uses: actions/cache/restore@v4
|
||||
id: cache-full
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
test/lib
|
||||
key: cache-${{ github.sha }}
|
||||
|
||||
- name: Wait for other Browserstack tests to finish
|
||||
uses: softprops/turnstyle@v1
|
||||
with:
|
||||
poll-interval-seconds: 30
|
||||
abort-after-seconds: 900
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run browserstack tests
|
||||
run: npm run test-browserstack -- --static-logging
|
||||
|
||||
- name: Run browserstack tests (lightweight) # overwrite test/lib
|
||||
run: |
|
||||
npm run build-test --lightweight
|
||||
npm run test-browserstack -- --static-logging
|
||||
env:
|
||||
LIGHTWEIGHT: true
|
||||
|
||||
types:
|
||||
name: Type definitions
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- run: npm ci --ignore-scripts # TS
|
||||
- name: Retrieve cached folders
|
||||
uses: actions/cache/restore@v4
|
||||
id: cache-full
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
test/lib
|
||||
key: cache-${{ github.sha }}
|
||||
- run: npm run test-type-definitions
|
||||
|
||||
lint:
|
||||
name: ESLint
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- run: npm ci --ignore-scripts # linter
|
||||
- name: Retrieve cached folders
|
||||
uses: actions/cache/restore@v4
|
||||
id: cache-full
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
test/lib
|
||||
key: cache-${{ github.sha }}
|
||||
- run: npm run lint
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,10 +1,8 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
npm*
|
||||
src/compression/
|
||||
test/lib/
|
||||
test/typescript/definitions.js
|
||||
dist/
|
||||
openpgp.store/
|
||||
doc/
|
||||
browserify-cache*.json
|
||||
.nyc_output/
|
||||
coverage
|
||||
|
17
.jsdocrc.cjs
Normal file
17
.jsdocrc.cjs
Normal file
@ -0,0 +1,17 @@
|
||||
const pkg = require('./package.json');
|
||||
|
||||
module.exports = {
|
||||
plugins: ['plugins/markdown'],
|
||||
markdown: {
|
||||
idInHeadings: true
|
||||
},
|
||||
templates: {
|
||||
default: {
|
||||
includeDate: false,
|
||||
outputSourceFiles: false,
|
||||
externalSourceLinks: {
|
||||
urlPrefix: `${pkg.repository.url}/blob/v${pkg.version}/src/`
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: ['plugins/markdown']
|
||||
};
|
6
.mocharc.json
Normal file
6
.mocharc.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"node-option": [
|
||||
"experimental-specifier-resolution=node",
|
||||
"loader=ts-node/esm"
|
||||
]
|
||||
}
|
55
.travis.yml
55
.travis.yml
@ -1,55 +0,0 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
addons:
|
||||
code_climate:
|
||||
repo_token: $CODECLIMATE_REPO_TOKEN
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- node_js: "8"
|
||||
env: OPENPGP_NODE_JS='8' OPENPGPJSTEST='unit'
|
||||
- node_js: "10"
|
||||
env: OPENPGP_NODE_JS='10' OPENPGPJSTEST='unit'
|
||||
- node_js: "12"
|
||||
env: OPENPGP_NODE_JS='12' OPENPGPJSTEST='unit'
|
||||
- node_js: "10"
|
||||
env: OPENPGP_NODE_JS='10' OPENPGPJSTEST='unit' LIGHTWEIGHT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='"firefox_26"' OPENPGPJSTEST='browserstack' COMPAT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='"firefox_61"' OPENPGPJSTEST='browserstack'
|
||||
- node_js: "10"
|
||||
env: BROWSER='"chrome_68"' OPENPGPJSTEST='browserstack' LIGHTWEIGHT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='"chrome_49"' OPENPGPJSTEST='browserstack' COMPAT=1
|
||||
- node_js: "10"
|
||||
env: BROWSER='"chrome_68"' OPENPGPJSTEST='browserstack'
|
||||
- node_js: "9"
|
||||
env: BROWSER='"ie_11"' OPENPGPJSTEST='browserstack' COMPAT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='"edge_17"' OPENPGPJSTEST='browserstack'
|
||||
- node_js: "9"
|
||||
env: BROWSER='"safari_9_1"' OPENPGPJSTEST='browserstack' COMPAT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='"safari_10_1"' OPENPGPJSTEST='browserstack' COMPAT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='"safari_11_1"' OPENPGPJSTEST='browserstack'
|
||||
- node_js: "9"
|
||||
env: BROWSER='{"os":"ios", "os_version":"10.3", "device":"iPhone 7 Plus", "real_mobile":true}' OPENPGPJSTEST='browserstack' COMPAT=1
|
||||
- node_js: "9"
|
||||
env: BROWSER='{"os":"ios", "os_version":"11.3", "device":"iPhone 8 Plus", "real_mobile":true}' OPENPGPJSTEST='browserstack'
|
||||
allow_failures:
|
||||
- node_js: "9"
|
||||
|
||||
before_script:
|
||||
- npm install -g grunt-cli codeclimate-test-reporter browserstack-runner
|
||||
script:
|
||||
- $TRAVIS_BUILD_DIR/travis.sh
|
||||
install: npm install
|
||||
env:
|
||||
global:
|
||||
- BROWSERSTACK_USERNAME=danielhuigens2
|
||||
- BROWSERSTACK_KEY=aW2q1ms393QRorwBnfmW
|
360
Gruntfile.js
360
Gruntfile.js
@ -1,360 +0,0 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
const version = grunt.option('release');
|
||||
const fs = require('fs');
|
||||
|
||||
// Project configuration.
|
||||
const dev = !!grunt.option('dev');
|
||||
const compat = !!grunt.option('compat');
|
||||
const lightweight = !!grunt.option('lightweight');
|
||||
const plugins = compat ? [
|
||||
"transform-async-to-generator",
|
||||
"syntax-async-functions",
|
||||
"transform-regenerator",
|
||||
"transform-runtime"
|
||||
] : [];
|
||||
const presets = [[require.resolve('babel-preset-env'), {
|
||||
targets: {
|
||||
browsers: compat ? [
|
||||
'IE >= 11',
|
||||
'Safari >= 9',
|
||||
'Last 2 Chrome versions',
|
||||
'Last 2 Firefox versions',
|
||||
'Last 2 Edge versions'
|
||||
] : [
|
||||
'Last 2 Chrome versions',
|
||||
'Last 2 Firefox versions',
|
||||
'Last 2 Safari versions',
|
||||
'Last 2 Edge versions'
|
||||
]
|
||||
}
|
||||
}]];
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
browserify: {
|
||||
openpgp: {
|
||||
files: {
|
||||
'dist/openpgp.js': ['./src/index.js']
|
||||
},
|
||||
options: {
|
||||
browserifyOptions: {
|
||||
fullPaths: dev,
|
||||
debug: dev,
|
||||
standalone: 'openpgp'
|
||||
},
|
||||
cacheFile: 'browserify-cache' + (compat ? '-compat' : '') + (lightweight ? '-lightweight' : '') + '.json',
|
||||
// Don't bundle these packages with openpgp.js
|
||||
external: ['crypto', 'zlib', 'node-localstorage', 'node-fetch', 'asn1.js', 'stream', 'buffer'].concat(
|
||||
compat ? [] : [
|
||||
'whatwg-fetch',
|
||||
'core-js/fn/array/fill',
|
||||
'core-js/fn/array/find',
|
||||
'core-js/fn/array/includes',
|
||||
'core-js/fn/array/from',
|
||||
'core-js/fn/promise',
|
||||
'core-js/fn/typed/uint8-array',
|
||||
'core-js/fn/string/repeat',
|
||||
'core-js/fn/symbol',
|
||||
'core-js/fn/object/assign'
|
||||
],
|
||||
lightweight ? [
|
||||
'elliptic',
|
||||
'elliptic.min.js'
|
||||
] : []
|
||||
),
|
||||
transform: [
|
||||
["babelify", {
|
||||
global: true,
|
||||
// Only babelify web-streams-polyfill, web-stream-tools, asmcrypto, email-addresses and seek-bzip in node_modules
|
||||
only: /^(?:.*\/node_modules\/@mattiasbuelens\/web-streams-polyfill\/|.*\/node_modules\/web-stream-tools\/|.*\/node_modules\/asmcrypto\.js\/|.*\/node_modules\/email-addresses\/|.*\/node_modules\/seek-bzip\/|(?!.*\/node_modules\/)).*$/,
|
||||
ignore: ['*.min.js'],
|
||||
plugins,
|
||||
presets
|
||||
}]
|
||||
],
|
||||
plugin: ['browserify-derequire']
|
||||
}
|
||||
},
|
||||
worker: {
|
||||
files: {
|
||||
'dist/openpgp.worker.js': ['./src/worker/worker.js']
|
||||
},
|
||||
options: {
|
||||
cacheFile: 'browserify-cache-worker.json'
|
||||
}
|
||||
},
|
||||
unittests: {
|
||||
files: {
|
||||
'test/lib/unittests-bundle.js': ['./test/unittests.js']
|
||||
},
|
||||
options: {
|
||||
cacheFile: 'browserify-cache-unittests.json',
|
||||
external: ['buffer', 'openpgp', '../../dist/openpgp', '../../../dist/openpgp'],
|
||||
transform: [
|
||||
["babelify", {
|
||||
global: true,
|
||||
// Only babelify chai-as-promised in node_modules
|
||||
only: /^(?:.*\/node_modules\/chai-as-promised\/|(?!.*\/node_modules\/)).*$/,
|
||||
ignore: ['*.min.js'],
|
||||
plugins,
|
||||
presets
|
||||
}]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
nyc: {
|
||||
cover: {
|
||||
options: {
|
||||
include: ['dist/**'],
|
||||
reporter: ['text-summary'],
|
||||
reportDir: 'coverage'
|
||||
},
|
||||
cmd: false,
|
||||
args: ['grunt', 'mochaTest'],
|
||||
sourceMap: true
|
||||
},
|
||||
report: {
|
||||
options: {
|
||||
reporter: 'text'
|
||||
}
|
||||
}
|
||||
},
|
||||
replace: {
|
||||
openpgp: {
|
||||
src: ['dist/openpgp.js'],
|
||||
dest: ['dist/openpgp.js'],
|
||||
replacements: [{
|
||||
from: /OpenPGP.js VERSION/g,
|
||||
to: 'OpenPGP.js v<%= pkg.version %>'
|
||||
}]
|
||||
},
|
||||
openpgp_min: {
|
||||
src: ['dist/openpgp.min.js'],
|
||||
dest: ['dist/openpgp.min.js'],
|
||||
replacements: [{
|
||||
from: "openpgp.worker.js",
|
||||
to: "openpgp.worker.min.js"
|
||||
}]
|
||||
},
|
||||
worker_min: {
|
||||
src: ['dist/openpgp.worker.min.js'],
|
||||
dest: ['dist/openpgp.worker.min.js'],
|
||||
replacements: [{
|
||||
from: "openpgp.js",
|
||||
to: "openpgp.min.js"
|
||||
}]
|
||||
},
|
||||
lightweight_build: {
|
||||
src: ['dist/openpgp.js'],
|
||||
overwrite: true,
|
||||
replacements: [
|
||||
{
|
||||
from: "external_indutny_elliptic: false",
|
||||
to: "external_indutny_elliptic: true"
|
||||
}
|
||||
]
|
||||
},
|
||||
indutny_global: {
|
||||
src: ['dist/elliptic.min.js'],
|
||||
overwrite: true,
|
||||
replacements: [
|
||||
{
|
||||
from: 'b.elliptic=a()',
|
||||
to: 'b.openpgp.elliptic=a()'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
terser: {
|
||||
openpgp: {
|
||||
files: {
|
||||
'dist/openpgp.min.js' : ['dist/openpgp.js'],
|
||||
'dist/openpgp.worker.min.js' : ['dist/openpgp.worker.js']
|
||||
},
|
||||
options: {
|
||||
output: {
|
||||
comments: `/^!/`
|
||||
},
|
||||
sourceMap: dev ? {
|
||||
content: 'inline',
|
||||
url: 'inline'
|
||||
} : {},
|
||||
safari10: true
|
||||
}
|
||||
}
|
||||
},
|
||||
header: {
|
||||
openpgp: {
|
||||
options: {
|
||||
text: '/*! OpenPGP.js v<%= pkg.version %> - ' +
|
||||
'<%= grunt.template.today("yyyy-mm-dd") %> - ' +
|
||||
'this is LGPL licensed code, see LICENSE/our website <%= pkg.homepage %> for more information. */'
|
||||
},
|
||||
files: {
|
||||
'dist/openpgp.js': 'dist/openpgp.js',
|
||||
'dist/openpgp.worker.js': 'dist/openpgp.worker.js'
|
||||
}
|
||||
}
|
||||
},
|
||||
jsbeautifier: {
|
||||
files: ['src/**/*.js'],
|
||||
options: {
|
||||
indent_size: 2,
|
||||
preserve_newlines: true,
|
||||
keep_array_indentation: false,
|
||||
keep_function_indentation: false,
|
||||
wrap_line_length: 120
|
||||
}
|
||||
},
|
||||
eslint: {
|
||||
target: ['src/**/*.js', './Gruntfile.js', './eslintrc.js', 'test/crypto/**/*.js'],
|
||||
options: {
|
||||
configFile: '.eslintrc.js',
|
||||
fix: !!grunt.option('fix')
|
||||
}
|
||||
},
|
||||
jsdoc: {
|
||||
dist: {
|
||||
src: ['README.md', 'src'],
|
||||
options: {
|
||||
configure: '.jsdocrc.js',
|
||||
destination: 'doc',
|
||||
recurse: true
|
||||
}
|
||||
}
|
||||
},
|
||||
mochaTest: {
|
||||
unittests: {
|
||||
options: {
|
||||
reporter: 'spec',
|
||||
timeout: 120000,
|
||||
grep: lightweight ? 'lightweight' : undefined
|
||||
},
|
||||
src: ['test/unittests.js']
|
||||
}
|
||||
},
|
||||
copy: {
|
||||
browsertest: {
|
||||
expand: true,
|
||||
flatten: true,
|
||||
cwd: 'node_modules/',
|
||||
src: ['mocha/mocha.css', 'mocha/mocha.js'],
|
||||
dest: 'test/lib/'
|
||||
},
|
||||
openpgp_compat: {
|
||||
expand: true,
|
||||
cwd: 'dist/',
|
||||
src: ['*.js'],
|
||||
dest: 'dist/compat/'
|
||||
},
|
||||
openpgp_lightweight: {
|
||||
expand: true,
|
||||
cwd: 'dist/',
|
||||
src: ['*.js'],
|
||||
dest: 'dist/lightweight/'
|
||||
},
|
||||
indutny_elliptic: {
|
||||
expand: true,
|
||||
flatten: true,
|
||||
src: ['./node_modules/elliptic/dist/elliptic.min.js'],
|
||||
dest: 'dist/'
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
dist: ['dist/'],
|
||||
js: ['dist/*.js']
|
||||
},
|
||||
connect: {
|
||||
dev: {
|
||||
options: {
|
||||
port: 3001,
|
||||
base: '.',
|
||||
keepalive: true
|
||||
}
|
||||
},
|
||||
test: {
|
||||
options: {
|
||||
port: 3000,
|
||||
base: '.'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
src: {
|
||||
files: ['src/**/*.js'],
|
||||
tasks: lightweight ? ['browserify:openpgp', 'browserify:worker', 'replace:lightweight_build'] : ['browserify:openpgp', 'browserify:worker']
|
||||
},
|
||||
test: {
|
||||
files: ['test/*.js', 'test/crypto/**/*.js', 'test/general/**/*.js', 'test/worker/**/*.js'],
|
||||
tasks: ['browserify:unittests']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Load the plugin(s)
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
grunt.loadNpmTasks('grunt-terser');
|
||||
grunt.loadNpmTasks('grunt-header');
|
||||
grunt.loadNpmTasks('grunt-text-replace');
|
||||
grunt.loadNpmTasks('grunt-jsbeautifier');
|
||||
grunt.loadNpmTasks('grunt-jsdoc');
|
||||
grunt.loadNpmTasks('gruntify-eslint');
|
||||
grunt.loadNpmTasks('grunt-mocha-test');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-simple-nyc');
|
||||
|
||||
grunt.registerTask('set_version', function() {
|
||||
if (!version) {
|
||||
throw new Error('You must specify the version: "--release=1.0.0"');
|
||||
}
|
||||
|
||||
patchFile({
|
||||
fileName: 'package.json',
|
||||
version: version
|
||||
});
|
||||
|
||||
patchFile({
|
||||
fileName: 'package-lock.json',
|
||||
version: version
|
||||
});
|
||||
|
||||
patchFile({
|
||||
fileName: 'bower.json',
|
||||
version: version
|
||||
});
|
||||
});
|
||||
|
||||
function patchFile(options) {
|
||||
const path = './' + options.fileName;
|
||||
//eslint-disable-next-line
|
||||
const file = require(path);
|
||||
|
||||
if (options.version) {
|
||||
file.version = options.version;
|
||||
}
|
||||
//eslint-disable-next-line
|
||||
fs.writeFileSync(path, JSON.stringify(file, null, 2) + '\n');
|
||||
}
|
||||
|
||||
// Build tasks
|
||||
grunt.registerTask('version', ['replace:openpgp']);
|
||||
grunt.registerTask('replace_min', ['replace:openpgp_min', 'replace:worker_min']);
|
||||
grunt.registerTask('build', function() {
|
||||
if (lightweight) {
|
||||
grunt.task.run(['copy:indutny_elliptic', 'browserify:openpgp', 'browserify:worker', 'replace:lightweight_build', 'replace:indutny_global', 'version', 'header', 'terser', 'replace_min']);
|
||||
return;
|
||||
}
|
||||
grunt.task.run(['browserify:openpgp', 'browserify:worker', 'version', 'header', 'terser', 'replace_min']);
|
||||
}
|
||||
);
|
||||
grunt.registerTask('documentation', ['jsdoc']);
|
||||
grunt.registerTask('default', ['build']);
|
||||
// Test/Dev tasks
|
||||
grunt.registerTask('test', ['eslint', 'mochaTest']);
|
||||
grunt.registerTask('coverage', ['nyc']);
|
||||
grunt.registerTask('browsertest', ['build', 'browserify:unittests', 'copy:browsertest', 'connect:test', 'watch']);
|
||||
};
|
608
README.md
608
README.md
@ -1,28 +1,26 @@
|
||||
OpenPGP.js [](https://travis-ci.org/openpgpjs/openpgpjs) [](https://automate.browserstack.com/public-build/eEkxVVM1TytwOGJNWEdnTjk4Y0VNUUNyR3pXcEtJUGRXOVFBRjVNT1JpUT0tLTZYUlZaMWdtQWs4Z0ROS3grRXc2bFE9PQ==--4a9cac0d6ea009d81aff66de0dbb239edd1aef3c) [](https://gitter.im/openpgpjs/openpgpjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
OpenPGP.js [](https://gitter.im/openpgpjs/openpgpjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
==========
|
||||
|
||||
[OpenPGP.js](https://openpgpjs.org/) is a JavaScript implementation of the OpenPGP protocol. This is defined in [RFC 4880](https://tools.ietf.org/html/rfc4880).
|
||||
[OpenPGP.js](https://openpgpjs.org/) is a JavaScript implementation of the OpenPGP protocol. It implements [RFC 9580](https://datatracker.ietf.org/doc/rfc9580/) (superseding [RFC 4880](https://tools.ietf.org/html/rfc4880) and [RFC 4880bis](https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-10)).
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
|
||||
**Table of Contents**
|
||||
|
||||
- [OpenPGP.js](#openpgpjs)
|
||||
- [Platform Support](#platform-support)
|
||||
- [Performance](#performance)
|
||||
- [Getting started](#getting-started)
|
||||
- [Npm](#npm)
|
||||
- [Bower](#bower)
|
||||
- [Node.js](#nodejs)
|
||||
- [Deno (experimental)](#deno-experimental)
|
||||
- [Browser (webpack)](#browser-webpack)
|
||||
- [Browser (plain files)](#browser-plain-files)
|
||||
- [Examples](#examples)
|
||||
- [Set up](#set-up)
|
||||
- [Encrypt and decrypt *Uint8Array* data with a password](#encrypt-and-decrypt-uint8array-data-with-a-password)
|
||||
- [Encrypt and decrypt *String* data with PGP keys](#encrypt-and-decrypt-string-data-with-pgp-keys)
|
||||
- [Encrypt with compression](#encrypt-with-compression)
|
||||
- [Encrypt symmetrically with compression](#encrypt-symmetrically-with-compression)
|
||||
- [Streaming encrypt *Uint8Array* data with a password](#streaming-encrypt-uint8array-data-with-a-password)
|
||||
- [Streaming encrypt and decrypt *String* data with PGP keys](#streaming-encrypt-and-decrypt-string-data-with-pgp-keys)
|
||||
- [Generate new key pair](#generate-new-key-pair)
|
||||
- [Revoke a key](#revoke-a-key)
|
||||
- [Lookup public key on HKP server](#lookup-public-key-on-hkp-server)
|
||||
- [Upload public key to HKP server](#upload-public-key-to-hkp-server)
|
||||
- [Sign and verify cleartext messages](#sign-and-verify-cleartext-messages)
|
||||
- [Create and verify *detached* signatures](#create-and-verify-detached-signatures)
|
||||
- [Streaming sign and verify *Uint8Array* data](#streaming-sign-and-verify-uint8array-data)
|
||||
@ -32,147 +30,183 @@ OpenPGP.js [
|
||||
- [How do I get involved?](#how-do-i-get-involved)
|
||||
- [License](#license)
|
||||
- [Resources](#resources)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
### Platform Support
|
||||
|
||||
* The `dist/openpgp.min.js` bundle works well with recent versions of Chrome, Firefox, Safari and Edge. It also works in Node.js 8+.
|
||||
* The `dist/openpgp.min.js` (or `.mjs`) bundle works with recent versions of Chrome, Firefox, Edge and Safari 14+.
|
||||
|
||||
* The `dist/compat/openpgp.min.js` bundle also works with Internet Explorer 11 and old versions of Safari. Please note that this bundle overwrites the global `Promise` with a polyfill version even in some cases where it already exists, which may cause issues. It also adds some built-in prototype functions if they don't exist, such as `Array.prototype.includes`.
|
||||
* The `dist/node/openpgp.min.mjs` (or `.cjs`) bundle works in Node.js v18+: it is used by default when you `import ... from 'openpgp'` (or `require('openpgp')`, respectively).
|
||||
|
||||
* If you wish, you could even load one or the other depending on which browser the user is using. However, if you're using the Web Worker, keep in mind that you also need to pass `{ path: 'compat/openpgp.worker.min.js' }` to `initWorker` whenever you load `compat/openpgp.min.js`.
|
||||
* Support for the [Web Cryptography API](https://w3c.github.io/webcrypto/)'s `SubtleCrypto` is required.
|
||||
* In browsers, `SubtleCrypto` is only available in [secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).
|
||||
* In supported versions of Node.js, `SubtleCrypto` is always available.
|
||||
|
||||
* Support for the [Web Streams API](https://streams.spec.whatwg.org/) is required.
|
||||
* In browsers: the latest versions of Chrome, Firefox, Edge and Safari support Streams, including `TransformStream`s.
|
||||
These are needed if you use the library with stream inputs.
|
||||
In previous versions of OpenPGP.js, Web Streams were automatically polyfilled by the library,
|
||||
but from v6 this task is left up to the library user, due to the more extensive browser support, and the
|
||||
polyfilling side-effects. If you're working with [older browsers versions which do not implement e.g. TransformStreams](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream#browser_compatibility), you can manually
|
||||
load the [Web Streams polyfill](https://github.com/MattiasBuelens/web-streams-polyfills).
|
||||
Please note that when you load the polyfills, the global `ReadableStream` property (if it exists) gets overwritten with the polyfill version.
|
||||
In some edge cases, you might need to use the native
|
||||
`ReadableStream` (for example when using it to create a `Response`
|
||||
object), in which case you should store a reference to it before loading
|
||||
the polyfills. There is also the [web-streams-adapter](https://github.com/MattiasBuelens/web-streams-adapter)
|
||||
library to convert back and forth between them.
|
||||
* In Node.js: OpenPGP.js v6 no longer supports native Node `Readable` streams in inputs, and instead expects (and outputs) [Node's Web Streams](https://nodejs.org/api/webstreams.html#class-readablestream). [Node v17+ includes utilities to convert from and to Web Streams](https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options).
|
||||
|
||||
* Currently, Chrome, Safari and Edge have partial implementations of the
|
||||
[Streams specification](https://streams.spec.whatwg.org/), and Firefox
|
||||
has a partial implementation behind feature flags. Chrome is the only
|
||||
browser that implements `TransformStream`s, which we need, so we include
|
||||
a [polyfill](https://github.com/MattiasBuelens/web-streams-polyfill) for
|
||||
all other browsers. Please note that in those browsers, the global
|
||||
`ReadableStream` property gets overwritten with the polyfill version if
|
||||
it exists. In some edge cases, you might need to use the native
|
||||
`ReadableStream` (for example when using it to create a `Response`
|
||||
object), in which case you should store a reference to it before loading
|
||||
OpenPGP.js. There is also the
|
||||
[web-streams-adapter](https://github.com/MattiasBuelens/web-streams-adapter)
|
||||
library to convert back and forth between them.
|
||||
|
||||
### Performance
|
||||
|
||||
* Version 3.0.0 of the library introduces support for public-key cryptography using [elliptic curves](https://wiki.gnupg.org/ECC). We use native implementations on browsers and Node.js when available or [Elliptic](https://github.com/indutny/elliptic) otherwise. Elliptic curve cryptography provides stronger security per bits of key, which allows for much faster operations. Currently the following curves are supported (* = when available):
|
||||
* Version 3.0.0 of the library introduced support for public-key cryptography using [elliptic curves](https://wiki.gnupg.org/ECC). We use native implementations on browsers and Node.js when available. Compared to RSA, elliptic curve cryptography provides stronger security per bits of key, which allows for much faster operations. Currently the following curves are supported:
|
||||
|
||||
| Curve | Encryption | Signature | NodeCrypto | WebCrypto | Constant-Time |
|
||||
|:---------------:|:----------:|:---------:|:----------:|:---------:|:-----------------:|
|
||||
| curve25519 | ECDH | N/A | No | No | Algorithmically |
|
||||
| ed25519 | N/A | EdDSA | No | Yes* | If native** |
|
||||
| nistP256 | ECDH | ECDSA | Yes* | Yes* | If native** |
|
||||
| nistP384 | ECDH | ECDSA | Yes* | Yes* | If native** |
|
||||
| nistP521 | ECDH | ECDSA | Yes* | Yes* | If native** |
|
||||
| brainpoolP256r1 | ECDH | ECDSA | Yes* | No | If native** |
|
||||
| brainpoolP384r1 | ECDH | ECDSA | Yes* | No | If native** |
|
||||
| brainpoolP512r1 | ECDH | ECDSA | Yes* | No | If native** |
|
||||
| secp256k1 | ECDH | ECDSA | Yes* | No | If native** |
|
||||
|
||||
| Curve | Encryption | Signature | Elliptic | NodeCrypto | WebCrypto |
|
||||
|:--------------- |:----------:|:---------:|:--------:|:----------:|:---------:|
|
||||
| p256 | ECDH | ECDSA | Yes | Yes* | Yes* |
|
||||
| p384 | ECDH | ECDSA | Yes | Yes* | Yes* |
|
||||
| p521 | ECDH | ECDSA | Yes | Yes* | Yes* |
|
||||
| secp256k1 | ECDH | ECDSA | Yes | Yes* | No |
|
||||
| brainpoolP256r1 | ECDH | ECDSA | Yes | Yes* | No |
|
||||
| brainpoolP384r1 | ECDH | ECDSA | Yes | Yes* | No |
|
||||
| brainpoolP512r1 | ECDH | ECDSA | Yes | Yes* | No |
|
||||
| curve25519 | ECDH | N/A | Yes | No | No |
|
||||
| ed25519 | N/A | EdDSA | Yes | No | No |
|
||||
\* when available
|
||||
\** these curves are only constant-time if the underlying native implementation is available and constant-time
|
||||
|
||||
* Version 2.x of the library has been built from the ground up with Uint8Arrays. This allows for much better performance and memory usage than strings.
|
||||
* The platform's [native Web Crypto API](https://w3c.github.io/webcrypto/) is used for performance. On Node.js the native [crypto module](https://nodejs.org/api/crypto.html#crypto_crypto) is also used, in cases where it offers additional functionality.
|
||||
|
||||
* If the user's browser supports [native WebCrypto](https://caniuse.com/#feat=cryptography) via the `window.crypto.subtle` API, this will be used. Under Node.js the native [crypto module](https://nodejs.org/api/crypto.html#crypto_crypto) is used. This can be deactivated by setting `openpgp.config.use_native = false`.
|
||||
|
||||
* The library implements the [IETF proposal](https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-07) for authenticated encryption using native AES-EAX, OCB, or GCM. This makes symmetric encryption up to 30x faster on supported platforms. Since the specification has not been finalized and other OpenPGP implementations haven't adopted it yet, the feature is currently behind a flag. **Note: activating this setting can break compatibility with other OpenPGP implementations, and also with future versions of OpenPGP.js. Don't use it with messages you want to store on disk or in a database.** You can enable it by setting `openpgp.config.aead_protect = true`.
|
||||
* The library implements authenticated encryption (AEAD) as per [RFC 9580](https://datatracker.ietf.org/doc/rfc9580/) using AES-GCM, OCB, or EAX. This makes symmetric encryption faster on platforms with native implementations. However, since the specification is very recent and other OpenPGP implementations are in the process of adopting it, the feature is currently behind a flag. **Note: activating this setting can break compatibility with other OpenPGP implementations which have yet to implement the feature.** You can enable it by setting `openpgp.config.aeadProtect = true`.
|
||||
Note that this setting has a different effect from the one in OpenPGP.js v5, which implemented support for a provisional version of AEAD from [RFC 4880bis](https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-10), which was modified in RFC 9580.
|
||||
|
||||
You can change the AEAD mode by setting one of the following options:
|
||||
|
||||
```
|
||||
openpgp.config.aead_mode = openpgp.enums.aead.eax // Default, native
|
||||
openpgp.config.aead_mode = openpgp.enums.aead.ocb // Non-native
|
||||
openpgp.config.aead_mode = openpgp.enums.aead.experimental_gcm // **Non-standard**, fastest
|
||||
openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.gcm; // Default, native in WebCrypto and Node.js
|
||||
openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.ocb; // Non-native, but supported across RFC 9580 implementations
|
||||
openpgp.config.preferredAEADAlgorithm = openpgp.enums.aead.eax; // Native in Node.js
|
||||
```
|
||||
|
||||
* For environments that don't provide native crypto, the library falls back to [asm.js](https://caniuse.com/#feat=asmjs) implementations of AES, SHA-1, and SHA-256. We use [Rusha](https://github.com/srijs/rusha) and [asmCrypto Lite](https://github.com/openpgpjs/asmcrypto-lite) (a minimal subset of asmCrypto.js built specifically for OpenPGP.js).
|
||||
|
||||
|
||||
### Getting started
|
||||
|
||||
#### Npm
|
||||
#### Node.js
|
||||
|
||||
npm install --save openpgp
|
||||
Install OpenPGP.js using npm and save it in your dependencies:
|
||||
|
||||
#### Bower
|
||||
```sh
|
||||
npm install --save openpgp
|
||||
```
|
||||
|
||||
bower install --save openpgp
|
||||
And import it as an ES module, from a .mjs file:
|
||||
```js
|
||||
import * as openpgp from 'openpgp';
|
||||
```
|
||||
|
||||
Or just fetch a minified build under [dist](https://github.com/openpgpjs/openpgpjs/tree/master/dist).
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
Here are some examples of how to use the v2.x+ API. For more elaborate examples and working code, please check out the [public API unit tests](https://github.com/openpgpjs/openpgpjs/blob/master/test/general/openpgp.js). If you're upgrading from v1.x it might help to check out the [documentation](https://github.com/openpgpjs/openpgpjs#documentation).
|
||||
|
||||
#### Set up
|
||||
|
||||
##### Node.js
|
||||
Or as a CommonJS module:
|
||||
|
||||
```js
|
||||
const openpgp = require('openpgp');
|
||||
```
|
||||
|
||||
##### Browser
|
||||
#### Deno (experimental)
|
||||
|
||||
Copy `dist/openpgp.min.js` or `dist/compat/openpgp.min.js` (depending on the browser support you need, see [Platform Support](#platform-support)) to your project folder, and load it in a script tag:
|
||||
Import as an ES6 module, using /dist/openpgp.mjs.
|
||||
|
||||
```js
|
||||
import * as openpgp from './openpgpjs/dist/openpgp.mjs';
|
||||
```
|
||||
|
||||
#### Browser (webpack)
|
||||
|
||||
Install OpenPGP.js using npm and save it in your devDependencies:
|
||||
|
||||
```sh
|
||||
npm install --save-dev openpgp
|
||||
```
|
||||
|
||||
And import it as an ES6 module:
|
||||
|
||||
```js
|
||||
import * as openpgp from 'openpgp';
|
||||
```
|
||||
|
||||
You can also only import the functions you need, as follows:
|
||||
|
||||
```js
|
||||
import { readMessage, decrypt } from 'openpgp';
|
||||
```
|
||||
|
||||
Or, if you want to use the lightweight build (which is smaller, and lazily loads non-default curves on demand):
|
||||
|
||||
```js
|
||||
import * as openpgp from 'openpgp/lightweight';
|
||||
```
|
||||
|
||||
To test whether the lazy loading works, try to generate a key with a non-standard curve:
|
||||
|
||||
```js
|
||||
import { generateKey } from 'openpgp/lightweight';
|
||||
await generateKey({ curve: 'brainpoolP512r1', userIDs: [{ name: 'Test', email: 'test@test.com' }] });
|
||||
```
|
||||
|
||||
For more examples of how to generate a key, see [Generate new key pair](#generate-new-key-pair). It is recommended to use `curve25519` instead of `brainpoolP512r1` by default.
|
||||
|
||||
|
||||
#### Browser (plain files)
|
||||
|
||||
Grab `openpgp.min.js` from [unpkg.com/openpgp/dist](https://unpkg.com/openpgp/dist/), and load it in a script tag:
|
||||
|
||||
```html
|
||||
<script src="openpgp.min.js"></script>
|
||||
```
|
||||
|
||||
If you want to use the built-in Web Worker, to offload cryptographic operations off the main thread:
|
||||
|
||||
```js
|
||||
await openpgp.initWorker({ path: 'openpgp.worker.js' }); // set the relative web worker path
|
||||
```
|
||||
|
||||
On logout, be sure to destroy the worker again, to clear private keys from memory:
|
||||
|
||||
```js
|
||||
await openpgp.destroyWorker();
|
||||
```
|
||||
|
||||
Alternatively, you can also implement a Web Worker in your application and load OpenPGP.js from there. This can be more performant if you store or fetch keys and messages directly inside the Worker, so that they don't have to be `postMessage`d there.
|
||||
|
||||
If you want to use the lightweight build (which is smaller, and lazily loads non-default curves on demand), copy `dist/lightweight/openpgp.min.js` and `dist/lightweight/elliptic.min.js`, load the former in a script tag, and point `openpgp.config.indutny_elliptic_path` to the latter:
|
||||
Or, to load OpenPGP.js as an ES6 module, grab `openpgp.min.mjs` from [unpkg.com/openpgp/dist](https://unpkg.com/openpgp/dist/), and import it as follows:
|
||||
|
||||
```html
|
||||
<script src="lightweight/openpgp.min.js"></script>
|
||||
<script>
|
||||
openpgp.config.indutny_elliptic_path = 'lightweight/elliptic.min.js';
|
||||
<script type="module">
|
||||
import * as openpgp from './openpgp.min.mjs';
|
||||
</script>
|
||||
```
|
||||
|
||||
To test whether the lazy loading works, try:
|
||||
To offload cryptographic operations off the main thread, you can implement a Web Worker in your application and load OpenPGP.js from there. For an example Worker implementation, see `test/worker/worker_example.js`.
|
||||
|
||||
```js
|
||||
await openpgp.generateKey({ curve: 'brainpoolP512r1', userIds: [{ name: 'Test', email: 'test@test.com' }] });
|
||||
#### TypeScript
|
||||
|
||||
Since TS is not fully integrated in the library, TS-only dependencies are currently listed as `devDependencies`, so to compile the project you’ll need to add `@openpgp/web-stream-tools` manually:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @openpgp/web-stream-tools
|
||||
```
|
||||
|
||||
For more examples of how to generate a key, see [Generate new key pair](#generate-new-key-pair). It is recommended to use `curve25519` instead of `brainpoolP512r1` by default.
|
||||
If you notice missing or incorrect type definitions, feel free to open a PR.
|
||||
|
||||
### Examples
|
||||
|
||||
Here are some examples of how to use OpenPGP.js v6. For more elaborate examples and working code, please check out the [public API unit tests](https://github.com/openpgpjs/openpgpjs/blob/main/test/general/openpgp.js). If you're upgrading from v4 it might help to check out the [changelog](https://github.com/openpgpjs/openpgpjs/wiki/v6-Changelog) and [documentation](https://github.com/openpgpjs/openpgpjs#documentation).
|
||||
|
||||
#### Encrypt and decrypt *Uint8Array* data with a password
|
||||
|
||||
Encryption will use the algorithm specified in config.encryption_cipher (defaults to aes256), and decryption will use the algorithm used for encryption.
|
||||
Encryption will use the algorithm specified in config.preferredSymmetricAlgorithm (defaults to aes256), and decryption will use the algorithm used for encryption.
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
const { message } = await openpgp.encrypt({
|
||||
message: openpgp.message.fromBinary(new Uint8Array([0x01, 0x01, 0x01])), // input as Message object
|
||||
passwords: ['secret stuff'], // multiple passwords possible
|
||||
armor: false // don't ASCII armor (for Uint8Array output)
|
||||
const message = await openpgp.createMessage({ binary: new Uint8Array([0x01, 0x01, 0x01]) });
|
||||
const encrypted = await openpgp.encrypt({
|
||||
message, // input as Message object
|
||||
passwords: ['secret stuff'], // multiple passwords possible
|
||||
format: 'binary' // don't ASCII armor (for Uint8Array output)
|
||||
});
|
||||
const encrypted = message.packets.write(); // get raw encrypted packets as Uint8Array
|
||||
console.log(encrypted); // Uint8Array
|
||||
|
||||
const encryptedMessage = await openpgp.readMessage({
|
||||
binaryMessage: encrypted // parse encrypted bytes
|
||||
});
|
||||
const { data: decrypted } = await openpgp.decrypt({
|
||||
message: await openpgp.message.read(encrypted), // parse encrypted bytes
|
||||
passwords: ['secret stuff'], // decrypt with password
|
||||
format: 'binary' // output as Uint8Array
|
||||
message: encryptedMessage,
|
||||
passwords: ['secret stuff'], // decrypt with password
|
||||
format: 'binary' // output as Uint8Array
|
||||
});
|
||||
console.log(decrypted); // Uint8Array([0x01, 0x01, 0x01])
|
||||
})();
|
||||
@ -180,14 +214,12 @@ Encryption will use the algorithm specified in config.encryption_cipher (default
|
||||
|
||||
#### Encrypt and decrypt *String* data with PGP keys
|
||||
|
||||
Encryption will use the algorithm preferred by the public key (defaults to aes256 for keys generated in OpenPGP.js), and decryption will use the algorithm used for encryption.
|
||||
Encryption will use the algorithm preferred by the public (encryption) key (defaults to aes256 for keys generated in OpenPGP.js), and decryption will use the algorithm used for encryption.
|
||||
|
||||
```js
|
||||
const openpgp = require('openpgp'); // use as CommonJS, AMD, ES6 module or via window.openpgp
|
||||
|
||||
(async () => {
|
||||
await openpgp.initWorker({ path: 'openpgp.worker.js' }); // set the relative web worker path
|
||||
|
||||
// put keys in backtick (``) to avoid errors caused by spaces or tabs
|
||||
const publicKeyArmored = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
...
|
||||
@ -197,25 +229,40 @@ const openpgp = require('openpgp'); // use as CommonJS, AMD, ES6 module or via w
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // encrypted private key
|
||||
const passphrase = `yourPassphrase`; // what the private key is encrypted with
|
||||
|
||||
const { keys: [privateKey] } = await openpgp.key.readArmored(privateKeyArmored);
|
||||
await privateKey.decrypt(passphrase);
|
||||
const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
|
||||
|
||||
const { data: encrypted } = await openpgp.encrypt({
|
||||
message: openpgp.message.fromText('Hello, World!'), // input as Message object
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys, // for encryption
|
||||
privateKeys: [privateKey] // for signing (optional)
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
|
||||
const encrypted = await openpgp.encrypt({
|
||||
message: await openpgp.createMessage({ text: 'Hello, World!' }), // input as Message object
|
||||
encryptionKeys: publicKey,
|
||||
signingKeys: privateKey // optional
|
||||
});
|
||||
console.log(encrypted); // '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
||||
const { data: decrypted } = await openpgp.decrypt({
|
||||
message: await openpgp.message.readArmored(encrypted), // parse armored message
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys, // for verification (optional)
|
||||
privateKeys: [privateKey] // for decryption
|
||||
|
||||
const message = await openpgp.readMessage({
|
||||
armoredMessage: encrypted // parse armored message
|
||||
});
|
||||
const { data: decrypted, signatures } = await openpgp.decrypt({
|
||||
message,
|
||||
verificationKeys: publicKey, // optional
|
||||
decryptionKeys: privateKey
|
||||
});
|
||||
console.log(decrypted); // 'Hello, World!'
|
||||
// check signature validity (signed messages only)
|
||||
try {
|
||||
await signatures[0].verified; // throws on invalid signature
|
||||
console.log('Signature is valid');
|
||||
} catch (e) {
|
||||
throw new Error('Signature could not be verified: ' + e.message);
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
Encrypt with multiple public keys:
|
||||
Encrypt to multiple public keys:
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
@ -231,49 +278,88 @@ Encrypt with multiple public keys:
|
||||
...
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // encrypted private key
|
||||
const passphrase = `yourPassphrase`; // what the private key is encrypted with
|
||||
const message = 'Hello, World!';
|
||||
const plaintext = 'Hello, World!';
|
||||
|
||||
const { keys: [privateKey] } = await openpgp.key.readArmored(privateKeyArmored);
|
||||
await privateKey.decrypt(passphrase)
|
||||
const publicKeys = await Promise.all(publicKeysArmored.map(armoredKey => openpgp.readKey({ armoredKey })));
|
||||
|
||||
const publicKeys = await Promise.all(publicKeysArmored.map(async (key) => {
|
||||
return (await openpgp.key.readArmored(key)).keys[0];
|
||||
}));
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
|
||||
const { data: encrypted } = await openpgp.encrypt({
|
||||
message: openpgp.message.fromText(message), // input as Message object
|
||||
publicKeys, // for encryption
|
||||
privateKeys: [privateKey] // for signing (optional)
|
||||
const message = await openpgp.createMessage({ text: plaintext });
|
||||
const encrypted = await openpgp.encrypt({
|
||||
message, // input as Message object
|
||||
encryptionKeys: publicKeys,
|
||||
signingKeys: privateKey // optional
|
||||
});
|
||||
console.log(encrypted); // '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
||||
})();
|
||||
```
|
||||
|
||||
#### Encrypt with compression
|
||||
If you expect an encrypted message to be signed with one of the public keys you have, and do not want to trust the decrypted data otherwise, you can pass the decryption option `expectSigned = true`, so that the decryption operation will fail if no valid signature is found:
|
||||
```js
|
||||
(async () => {
|
||||
// put keys in backtick (``) to avoid errors caused by spaces or tabs
|
||||
const publicKeyArmored = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
...
|
||||
-----END PGP PUBLIC KEY BLOCK-----`;
|
||||
const privateKeyArmored = `-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
...
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // encrypted private key
|
||||
const passphrase = `yourPassphrase`; // what the private key is encrypted with
|
||||
|
||||
By default, `encrypt` will not use any compression. It's possible to override that behavior in two ways:
|
||||
const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
|
||||
|
||||
Either set the `compression` parameter in the options object when calling `encrypt`.
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
|
||||
const encryptedAndSignedMessage = `-----BEGIN PGP MESSAGE-----
|
||||
...
|
||||
-----END PGP MESSAGE-----`;
|
||||
|
||||
const message = await openpgp.readMessage({
|
||||
armoredMessage: encryptedAndSignedMessage // parse armored message
|
||||
});
|
||||
// decryption will fail if all signatures are invalid or missing
|
||||
const { data: decrypted, signatures } = await openpgp.decrypt({
|
||||
message,
|
||||
decryptionKeys: privateKey,
|
||||
expectSigned: true,
|
||||
verificationKeys: publicKey, // mandatory with expectSigned=true
|
||||
});
|
||||
console.log(decrypted); // 'Hello, World!'
|
||||
})();
|
||||
```
|
||||
|
||||
#### Encrypt symmetrically with compression
|
||||
|
||||
By default, `encrypt` will not use any compression when encrypting symmetrically only (i.e. when no `encryptionKeys` are given).
|
||||
It's possible to change that behaviour by enabling compression through the config, either for the single encryption:
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
const message = await openpgp.createMessage({ binary: new Uint8Array([0x01, 0x02, 0x03]) }); // or createMessage({ text: 'string' })
|
||||
const encrypted = await openpgp.encrypt({
|
||||
message: openpgp.message.fromBinary(new Uint8Array([0x01, 0x02, 0x03])), // or .fromText('string')
|
||||
passwords: ['secret stuff'], // multiple passwords possible
|
||||
compression: openpgp.enums.compression.zip // compress the data with zip
|
||||
message,
|
||||
passwords: ['secret stuff'], // multiple passwords possible
|
||||
config: { preferredCompressionAlgorithm: openpgp.enums.compression.zlib } // compress the data with zlib
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
Or, override the config to enable compression:
|
||||
|
||||
or by changing the default global configuration:
|
||||
```js
|
||||
openpgp.config.compression = openpgp.enums.compression.zlib;
|
||||
openpgp.config.preferredCompressionAlgorithm = openpgp.enums.compression.zlib
|
||||
```
|
||||
|
||||
Where the value can be any of:
|
||||
* `openpgp.enums.compression.zip`
|
||||
* `openpgp.enums.compression.zlib`
|
||||
* `openpgp.enums.compression.uncompressed` (default)
|
||||
|
||||
|
||||
|
||||
#### Streaming encrypt *Uint8Array* data with a password
|
||||
@ -287,34 +373,24 @@ Where the value can be any of:
|
||||
}
|
||||
});
|
||||
|
||||
const { message } = await openpgp.encrypt({
|
||||
message: openpgp.message.fromBinary(readableStream), // input as Message object
|
||||
passwords: ['secret stuff'], // multiple passwords possible
|
||||
armor: false // don't ASCII armor (for Uint8Array output)
|
||||
const message = await openpgp.createMessage({ binary: readableStream });
|
||||
const encrypted = await openpgp.encrypt({
|
||||
message, // input as Message object
|
||||
passwords: ['secret stuff'], // multiple passwords possible
|
||||
format: 'binary' // don't ASCII armor (for Uint8Array output)
|
||||
});
|
||||
const encrypted = message.packets.write(); // get raw encrypted packets as ReadableStream<Uint8Array>
|
||||
console.log(encrypted); // raw encrypted packets as ReadableStream<Uint8Array>
|
||||
|
||||
// Either pipe the above stream somewhere, pass it to another function,
|
||||
// or read it manually as follows:
|
||||
const reader = openpgp.stream.getReader(encrypted);
|
||||
while (true) {
|
||||
const { done, value } = await reader.read();
|
||||
if (done) break;
|
||||
console.log('new chunk:', value); // Uint8Array
|
||||
for await (const chunk of encrypted) {
|
||||
console.log('new chunk:', chunk); // Uint8Array
|
||||
}
|
||||
|
||||
// Or, in Node.js, you can pipe the above stream as follows:
|
||||
const nodeStream = openpgp.stream.webToNode(encrypted);
|
||||
nodeStream.pipe(nodeWritableStream);
|
||||
})();
|
||||
```
|
||||
|
||||
For more information on creating ReadableStreams, see [the MDN Documentation on `new
|
||||
ReadableStream()`](https://developer.mozilla.org/docs/Web/API/ReadableStream/ReadableStream).
|
||||
For more information on reading streams using `openpgp.stream`, see the documentation of
|
||||
[the web-stream-tools dependency](https://openpgpjs.org/web-stream-tools/), particularly
|
||||
its [Reader class](https://openpgpjs.org/web-stream-tools/Reader.html).
|
||||
|
||||
For more information on using ReadableStreams (both in browsers and Node.js), see [the MDN Documentation on the
|
||||
Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) .
|
||||
|
||||
#### Streaming encrypt and decrypt *String* data with PGP keys
|
||||
|
||||
@ -323,13 +399,17 @@ its [Reader class](https://openpgpjs.org/web-stream-tools/Reader.html).
|
||||
const publicKeyArmored = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
...
|
||||
-----END PGP PUBLIC KEY BLOCK-----`; // Public key
|
||||
const [privateKeyArmored] = `-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
const privateKeyArmored = `-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
...
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // Encrypted private key
|
||||
const passphrase = `yourPassphrase`; // Password that private key is encrypted with
|
||||
|
||||
const privateKey = (await openpgp.key.readArmored([privateKeyArmored])).keys[0];
|
||||
await privateKey.decrypt(passphrase);
|
||||
const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
|
||||
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
|
||||
const readableStream = new ReadableStream({
|
||||
start(controller) {
|
||||
@ -339,53 +419,64 @@ its [Reader class](https://openpgpjs.org/web-stream-tools/Reader.html).
|
||||
});
|
||||
|
||||
const encrypted = await openpgp.encrypt({
|
||||
message: openpgp.message.fromText(readableStream), // input as Message object
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys, // for encryption
|
||||
privateKeys: [privateKey] // for signing (optional)
|
||||
message: await openpgp.createMessage({ text: readableStream }), // input as Message object
|
||||
encryptionKeys: publicKey,
|
||||
signingKeys: privateKey // optional
|
||||
});
|
||||
const ciphertext = encrypted.data; // ReadableStream containing '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
||||
console.log(encrypted); // ReadableStream containing '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
||||
|
||||
const decrypted = await openpgp.decrypt({
|
||||
message: await openpgp.message.readArmored(ciphertext), // parse armored message
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys, // for verification (optional)
|
||||
privateKeys: [privateKey] // for decryption
|
||||
const message = await openpgp.readMessage({
|
||||
armoredMessage: encrypted // parse armored message
|
||||
});
|
||||
const plaintext = await openpgp.stream.readToEnd(decrypted.data); // 'Hello, World!'
|
||||
const decrypted = await openpgp.decrypt({
|
||||
message,
|
||||
verificationKeys: publicKey, // optional
|
||||
decryptionKeys: privateKey
|
||||
});
|
||||
const chunks = [];
|
||||
for await (const chunk of decrypted.data) {
|
||||
chunks.push(chunk);
|
||||
}
|
||||
const plaintext = chunks.join('');
|
||||
console.log(plaintext); // 'Hello, World!'
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
#### Generate new key pair
|
||||
|
||||
ECC keys:
|
||||
ECC keys (smaller and faster to generate):
|
||||
|
||||
Possible values for `curve` are: `curve25519`, `ed25519`, `p256`, `p384`, `p521`, `secp256k1`,
|
||||
`brainpoolP256r1`, `brainpoolP384r1`, or `brainpoolP512r1`.
|
||||
Possible values for `curve` are: `curve25519`, `ed25519`, `nistP256`, `nistP384`, `nistP521`,
|
||||
`brainpoolP256r1`, `brainpoolP384r1`, `brainpoolP512r1`, and `secp256k1`.
|
||||
Note that both the `curve25519` and `ed25519` options generate a primary key for signing using Ed25519
|
||||
and a subkey for encryption using Curve25519.
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
const { privateKeyArmored, publicKeyArmored, revocationCertificate } = await openpgp.generateKey({
|
||||
userIds: [{ name: 'Jon Smith', email: 'jon@example.com' }], // you can pass multiple user IDs
|
||||
curve: 'ed25519', // ECC curve name
|
||||
passphrase: 'super long and hard to guess secret' // protects the private key
|
||||
const { privateKey, publicKey, revocationCertificate } = await openpgp.generateKey({
|
||||
type: 'ecc', // Type of the key, defaults to ECC
|
||||
curve: 'curve25519', // ECC curve name, defaults to curve25519
|
||||
userIDs: [{ name: 'Jon Smith', email: 'jon@example.com' }], // you can pass multiple user IDs
|
||||
passphrase: 'super long and hard to guess secret', // protects the private key
|
||||
format: 'armored' // output key format, defaults to 'armored' (other options: 'binary' or 'object')
|
||||
});
|
||||
|
||||
console.log(privateKeyArmored); // '-----BEGIN PGP PRIVATE KEY BLOCK ... '
|
||||
console.log(publicKeyArmored); // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
|
||||
console.log(privateKey); // '-----BEGIN PGP PRIVATE KEY BLOCK ... '
|
||||
console.log(publicKey); // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
|
||||
console.log(revocationCertificate); // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
|
||||
})();
|
||||
```
|
||||
|
||||
RSA keys:
|
||||
RSA keys (increased compatibility):
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
const key = await openpgp.generateKey({
|
||||
userIds: [{ name: 'Jon Smith', email: 'jon@example.com' }], // you can pass multiple user IDs
|
||||
rsaBits: 4096, // RSA key size
|
||||
passphrase: 'super long and hard to guess secret' // protects the private key
|
||||
const { privateKey, publicKey } = await openpgp.generateKey({
|
||||
type: 'rsa', // Type of the key
|
||||
rsaBits: 4096, // RSA key size (defaults to 4096 bits)
|
||||
userIDs: [{ name: 'Jon Smith', email: 'jon@example.com' }], // you can pass multiple user IDs
|
||||
passphrase: 'super long and hard to guess secret' // protects the private key
|
||||
});
|
||||
})();
|
||||
```
|
||||
@ -395,9 +486,10 @@ RSA keys:
|
||||
Using a revocation certificate:
|
||||
```js
|
||||
(async () => {
|
||||
const { publicKeyArmored: revokedKeyArmored } = await openpgp.revokeKey({
|
||||
key: (await openpgp.key.readArmored(publicKeyArmored)).keys[0],
|
||||
revocationCertificate
|
||||
const { publicKey: revokedKeyArmored } = await openpgp.revokeKey({
|
||||
key: await openpgp.readKey({ armoredKey: publicKeyArmored }),
|
||||
revocationCertificate,
|
||||
format: 'armored' // output armored keys
|
||||
});
|
||||
console.log(revokedKeyArmored); // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
|
||||
})();
|
||||
@ -406,36 +498,11 @@ Using a revocation certificate:
|
||||
Using the private key:
|
||||
```js
|
||||
(async () => {
|
||||
const { publicKeyArmored, publicKey } = await openpgp.revokeKey({
|
||||
key: (await openpgp.key.readArmored(privateKeyArmored)).keys[0]
|
||||
const { publicKey: revokedKeyArmored } = await openpgp.revokeKey({
|
||||
key: await openpgp.readKey({ armoredKey: privateKeyArmored }),
|
||||
format: 'armored' // output armored keys
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
#### Lookup public key on HKP server
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
var hkp = new openpgp.HKP(); // Defaults to https://keyserver.ubuntu.com, or pass another keyserver URL as a string
|
||||
|
||||
let publicKeyArmored = await hkp.lookup({
|
||||
query: 'alice@example.com'
|
||||
});
|
||||
var { keys: [publicKey] } = await openpgp.key.readArmored(publicKeyArmored);
|
||||
})();
|
||||
```
|
||||
|
||||
#### Upload public key to HKP server
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
var hkp = new openpgp.HKP('https://pgp.mit.edu');
|
||||
|
||||
var publicKeyArmored = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
...
|
||||
-----END PGP PUBLIC KEY BLOCK-----`;
|
||||
|
||||
await hkp.upload(publicKeyArmored);
|
||||
console.log(revokedKeyArmored); // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
|
||||
})();
|
||||
```
|
||||
|
||||
@ -451,24 +518,33 @@ Using the private key:
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // encrypted private key
|
||||
const passphrase = `yourPassphrase`; // what the private key is encrypted with
|
||||
|
||||
const { keys: [privateKey] } = await openpgp.key.readArmored(privateKeyArmored);
|
||||
await privateKey.decrypt(passphrase);
|
||||
const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
|
||||
|
||||
const { data: cleartext } = await openpgp.sign({
|
||||
message: openpgp.cleartext.fromText('Hello, World!'), // CleartextMessage or Message object
|
||||
privateKeys: [privateKey] // for signing
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
console.log(cleartext); // '-----BEGIN PGP SIGNED MESSAGE ... END PGP SIGNATURE-----'
|
||||
|
||||
const verified = await openpgp.verify({
|
||||
message: await openpgp.cleartext.readArmored(cleartext), // parse armored message
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys // for verification
|
||||
const unsignedMessage = await openpgp.createCleartextMessage({ text: 'Hello, World!' });
|
||||
const cleartextMessage = await openpgp.sign({
|
||||
message: unsignedMessage, // CleartextMessage or Message object
|
||||
signingKeys: privateKey
|
||||
});
|
||||
const { valid } = verified.signatures[0];
|
||||
if (valid) {
|
||||
console.log('signed by key id ' + verified.signatures[0].keyid.toHex());
|
||||
} else {
|
||||
throw new Error('signature could not be verified');
|
||||
console.log(cleartextMessage); // '-----BEGIN PGP SIGNED MESSAGE ... END PGP SIGNATURE-----'
|
||||
|
||||
const signedMessage = await openpgp.readCleartextMessage({
|
||||
cleartextMessage // parse armored message
|
||||
});
|
||||
const verificationResult = await openpgp.verify({
|
||||
message: signedMessage,
|
||||
verificationKeys: publicKey
|
||||
});
|
||||
const { verified, keyID } = verificationResult.signatures[0];
|
||||
try {
|
||||
await verified; // throws on invalid signature
|
||||
console.log('Signed by key id ' + keyID.toHex());
|
||||
} catch (e) {
|
||||
throw new Error('Signature could not be verified: ' + e.message);
|
||||
}
|
||||
})();
|
||||
```
|
||||
@ -485,26 +561,35 @@ Using the private key:
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // encrypted private key
|
||||
const passphrase = `yourPassphrase`; // what the private key is encrypted with
|
||||
|
||||
const { keys: [privateKey] } = await openpgp.key.readArmored(privateKeyArmored);
|
||||
await privateKey.decrypt(passphrase);
|
||||
const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
|
||||
|
||||
const { signature: detachedSignature } = await openpgp.sign({
|
||||
message: openpgp.cleartext.fromText('Hello, World!'), // CleartextMessage or Message object
|
||||
privateKeys: [privateKey], // for signing
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
|
||||
const message = await openpgp.createMessage({ text: 'Hello, World!' });
|
||||
const detachedSignature = await openpgp.sign({
|
||||
message, // Message object
|
||||
signingKeys: privateKey,
|
||||
detached: true
|
||||
});
|
||||
console.log(detachedSignature);
|
||||
|
||||
const verified = await openpgp.verify({
|
||||
message: openpgp.cleartext.fromText('Hello, World!'), // CleartextMessage or Message object
|
||||
signature: await openpgp.signature.readArmored(detachedSignature), // parse detached signature
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys // for verification
|
||||
const signature = await openpgp.readSignature({
|
||||
armoredSignature: detachedSignature // parse detached signature
|
||||
});
|
||||
const { valid } = verified.signatures[0];
|
||||
if (valid) {
|
||||
console.log('signed by key id ' + verified.signatures[0].keyid.toHex());
|
||||
} else {
|
||||
throw new Error('signature could not be verified');
|
||||
const verificationResult = await openpgp.verify({
|
||||
message, // Message object
|
||||
signature,
|
||||
verificationKeys: publicKey
|
||||
});
|
||||
const { verified, keyID } = verificationResult.signatures[0];
|
||||
try {
|
||||
await verified; // throws on invalid signature
|
||||
console.log('Signed by key id ' + keyID.toHex());
|
||||
} catch (e) {
|
||||
throw new Error('Signature could not be verified: ' + e.message);
|
||||
}
|
||||
})();
|
||||
```
|
||||
@ -528,39 +613,40 @@ Using the private key:
|
||||
-----END PGP PRIVATE KEY BLOCK-----`; // encrypted private key
|
||||
const passphrase = `yourPassphrase`; // what the private key is encrypted with
|
||||
|
||||
const { keys: [privateKey] } = await openpgp.key.readArmored(privateKeyArmored);
|
||||
await privateKey.decrypt(passphrase);
|
||||
const privateKey = await openpgp.decryptKey({
|
||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
|
||||
passphrase
|
||||
});
|
||||
|
||||
const { data: signatureArmored } = await openpgp.sign({
|
||||
message: openpgp.message.fromBinary(readableStream), // or .fromText(readableStream: ReadableStream<String>)
|
||||
privateKeys: [privateKey] // for signing
|
||||
const message = await openpgp.createMessage({ binary: readableStream }); // or createMessage({ text: ReadableStream<String> })
|
||||
const signatureArmored = await openpgp.sign({
|
||||
message,
|
||||
signingKeys: privateKey
|
||||
});
|
||||
console.log(signatureArmored); // ReadableStream containing '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
||||
|
||||
const verified = await openpgp.verify({
|
||||
message: await openpgp.message.readArmored(signatureArmored), // parse armored signature
|
||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys // for verification
|
||||
const verificationResult = await openpgp.verify({
|
||||
message: await openpgp.readMessage({ armoredMessage: signatureArmored }), // parse armored signature
|
||||
verificationKeys: await openpgp.readKey({ armoredKey: publicKeyArmored })
|
||||
});
|
||||
|
||||
await openpgp.stream.readToEnd(verified.data);
|
||||
// Note: you *have* to read `verified.data` in some way or other,
|
||||
for await (const chunk of verificationResult.data) {}
|
||||
// Note: you *have* to read `verificationResult.data` in some way or other,
|
||||
// even if you don't need it, as that is what triggers the
|
||||
// verification of the data.
|
||||
|
||||
const { valid } = verified.signatures[0];
|
||||
if (valid) {
|
||||
console.log('signed by key id ' + verified.signatures[0].keyid.toHex());
|
||||
} else {
|
||||
throw new Error('signature could not be verified');
|
||||
try {
|
||||
await verificationResult.signatures[0].verified; // throws on invalid signature
|
||||
console.log('Signed by key id ' + verificationResult.signatures[0].keyID.toHex());
|
||||
} catch (e) {
|
||||
throw new Error('Signature could not be verified: ' + e.message);
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
A jsdoc build of our code comments is available at [doc/index.html](https://openpgpjs.org/openpgpjs/doc/index.html). Public calls should generally be made through the OpenPGP object [doc/openpgp.html](https://openpgpjs.org/openpgpjs/doc/module-openpgp.html).
|
||||
|
||||
For the documentation of `openpgp.stream`, see the documentation of [the web-stream-tools dependency](https://openpgpjs.org/web-stream-tools/).
|
||||
The full documentation is available at [openpgpjs.org](https://docs.openpgpjs.org/).
|
||||
|
||||
### Security Audit
|
||||
|
||||
@ -578,9 +664,9 @@ To create your own build of the library, just run the following command after cl
|
||||
|
||||
npm install && npm test
|
||||
|
||||
For debugging browser errors, you can open `test/unittests.html` in a browser or, after running the following command, open [`http://localhost:3000/test/unittests.html`](http://localhost:3000/test/unittests.html):
|
||||
For debugging browser errors, run the following command:
|
||||
|
||||
grunt browsertest
|
||||
npm run browsertest
|
||||
|
||||
### How do I get involved?
|
||||
|
||||
@ -589,13 +675,3 @@ You want to help, great! It's probably best to send us a message on [Gitter](htt
|
||||
### License
|
||||
|
||||
[GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.en.html) (3.0 or any later version). Please take a look at the [LICENSE](LICENSE) file for more information.
|
||||
|
||||
### Resources
|
||||
|
||||
Below is a collection of resources, many of these were projects that were in someway a precursor to the current OpenPGP.js project. If you'd like to add your link here, please do so in a pull request or email to the list.
|
||||
|
||||
* [https://www.hanewin.net/encrypt/](https://www.hanewin.net/encrypt/)
|
||||
* [https://github.com/seancolyer/gmail-crypt](https://github.com/seancolyer/gmail-crypt)
|
||||
* [https://github.com/mete0r/jspg](https://github.com/mete0r/jspg)
|
||||
* [https://github.com/GPGTools/Mobile/wiki/Introduction](https://github.com/GPGTools/Mobile/wiki/Introduction)
|
||||
* [https://github.com/gmontalvoriv/mailock](https://github.com/gmontalvoriv/mailock)
|
||||
|
7
SECURITY.md
Normal file
7
SECURITY.md
Normal file
@ -0,0 +1,7 @@
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
If you believe you have found a security vulnerability in OpenPGP.js, please report it via email to [security@openpgpjs.org](mailto:security@openpgpjs.org). If possible, encrypt your message with our PGP key: it can be downloaded automatically using [WKD](https://wiki.gnupg.org/WKD), or manually on [openpgpjs.org](https://openpgpjs.org/.well-known/openpgpkey/hu/t5s8ztdbon8yzntexy6oz5y48etqsnbb?l=security).
|
||||
|
||||
You should receive a response within 2 working days.
|
37
bower.json
37
bower.json
@ -1,37 +0,0 @@
|
||||
{
|
||||
"name": "openpgp",
|
||||
"version": "4.10.3",
|
||||
"license": "LGPL-3.0+",
|
||||
"homepage": "https://openpgpjs.org/",
|
||||
"authors": [
|
||||
"OpenPGP Development Team <list@openpgpjs.org> (https://github.com/openpgpjs/openpgpjs/graphs/contributors)"
|
||||
],
|
||||
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
||||
"main": [
|
||||
"dist/openpgp.js",
|
||||
"dist/openpgp.worker.js"
|
||||
],
|
||||
"moduleType": [
|
||||
"amd",
|
||||
"es6",
|
||||
"globals",
|
||||
"node"
|
||||
],
|
||||
"keywords": [
|
||||
"crypto",
|
||||
"gpg",
|
||||
"pgp",
|
||||
"openpgp",
|
||||
"encryption"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"dist/*.tgz",
|
||||
"dist/*_debug.js",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"doc"
|
||||
]
|
||||
}
|
59933
dist/compat/openpgp.js
vendored
59933
dist/compat/openpgp.js
vendored
File diff suppressed because one or more lines are too long
2
dist/compat/openpgp.min.js
vendored
2
dist/compat/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
173
dist/compat/openpgp.worker.js
vendored
173
dist/compat/openpgp.worker.js
vendored
@ -1,173 +0,0 @@
|
||||
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
(function (global){
|
||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||
// Copyright (C) 2011 Recurity Labs GmbH
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 3.0 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
/* eslint-disable no-restricted-globals */
|
||||
/* eslint-disable no-var */
|
||||
/* eslint-disable vars-on-top */
|
||||
|
||||
/**
|
||||
* @fileoverview Provides functions for communicating with workers
|
||||
* @see module:openpgp.initWorker
|
||||
* @see module:openpgp.getWorker
|
||||
* @see module:openpgp.destroyWorker
|
||||
* @see module:worker/async_proxy
|
||||
* @module worker/worker
|
||||
*/
|
||||
|
||||
importScripts('openpgp.js');
|
||||
var openpgp = global.openpgp;
|
||||
|
||||
var randomQueue = [];
|
||||
var MAX_SIZE_RANDOM_BUFFER = 60000;
|
||||
|
||||
/**
|
||||
* Handle random buffer exhaustion by requesting more random bytes from the main window
|
||||
* @returns {Promise<Object>} Empty promise whose resolution indicates that the buffer has been refilled
|
||||
*/
|
||||
function randomCallback() {
|
||||
|
||||
if (!randomQueue.length) {
|
||||
self.postMessage({ event: 'request-seed', amount: MAX_SIZE_RANDOM_BUFFER });
|
||||
}
|
||||
|
||||
return new Promise(function(resolve) {
|
||||
randomQueue.push(resolve);
|
||||
});
|
||||
}
|
||||
|
||||
openpgp.crypto.random.randomBuffer.init(MAX_SIZE_RANDOM_BUFFER, randomCallback);
|
||||
|
||||
/**
|
||||
* Handle messages from the main window.
|
||||
* @param {Object} event Contains event type and data
|
||||
*/
|
||||
self.onmessage = function(event) {
|
||||
var msg = event.data || {};
|
||||
|
||||
switch (msg.event) {
|
||||
case 'configure':
|
||||
configure(msg.config);
|
||||
break;
|
||||
|
||||
case 'seed-random':
|
||||
seedRandom(msg.buf);
|
||||
|
||||
var queueCopy = randomQueue;
|
||||
randomQueue = [];
|
||||
for (var i = 0; i < queueCopy.length; i++) {
|
||||
queueCopy[i]();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
delegate(msg.id, msg.event, msg.options || {});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Set config from main context to worker context.
|
||||
* @param {Object} config The openpgp configuration
|
||||
*/
|
||||
function configure(config) {
|
||||
Object.keys(config).forEach(function(key) {
|
||||
openpgp.config[key] = config[key];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Seed the library with entropy gathered global.crypto.getRandomValues
|
||||
* as this api is only avalible in the main window.
|
||||
* @param {ArrayBuffer} buffer Some random bytes
|
||||
*/
|
||||
function seedRandom(buffer) {
|
||||
if (!(buffer instanceof Uint8Array)) {
|
||||
buffer = new Uint8Array(buffer);
|
||||
}
|
||||
openpgp.crypto.random.randomBuffer.set(buffer);
|
||||
}
|
||||
|
||||
const keyCache = new Map();
|
||||
function getCachedKey(key) {
|
||||
const armor = key.armor();
|
||||
if (keyCache.has(armor)) {
|
||||
return keyCache.get(armor);
|
||||
}
|
||||
keyCache.set(armor, key);
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic proxy function that handles all commands from the public api.
|
||||
* @param {String} method The public api function to be delegated to the worker thread
|
||||
* @param {Object} options The api function's options
|
||||
*/
|
||||
function delegate(id, method, options) {
|
||||
if (method === 'clear-key-cache') {
|
||||
Array.from(keyCache.values()).forEach(key => {
|
||||
if (key.isPrivate()) {
|
||||
key.clearPrivateParams();
|
||||
}
|
||||
});
|
||||
keyCache.clear();
|
||||
response({ id, event: 'method-return' });
|
||||
return;
|
||||
}
|
||||
if (typeof openpgp[method] !== 'function') {
|
||||
response({ id:id, event:'method-return', err:'Unknown Worker Event' });
|
||||
return;
|
||||
}
|
||||
// construct ReadableStreams from MessagePorts
|
||||
openpgp.util.restoreStreams(options);
|
||||
// parse cloned packets
|
||||
options = openpgp.packet.clone.parseClonedPackets(options, method);
|
||||
// cache keys by armor, so that we don't have to repeatedly verify self-signatures
|
||||
if (options.publicKeys) {
|
||||
options.publicKeys = options.publicKeys.map(getCachedKey);
|
||||
}
|
||||
if (options.privateKeys) {
|
||||
options.privateKeys = options.privateKeys.map(getCachedKey);
|
||||
}
|
||||
openpgp[method](options).then(function(data) {
|
||||
// clone packets (for web worker structured cloning algorithm)
|
||||
response({ id:id, event:'method-return', data:openpgp.packet.clone.clonePackets(data) });
|
||||
}).catch(function(e) {
|
||||
openpgp.util.print_debug_error(e);
|
||||
response({
|
||||
id:id, event:'method-return', err:e.message, stack:e.stack
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Respond to the main window.
|
||||
* @param {Object} event Contains event type and data
|
||||
*/
|
||||
function response(event) {
|
||||
self.postMessage(event, openpgp.util.getTransferables(event.data, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Let the main window know the worker has loaded.
|
||||
*/
|
||||
postMessage({ event: 'loaded' });
|
||||
|
||||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{}]},{},[1]);
|
2
dist/compat/openpgp.worker.min.js
vendored
2
dist/compat/openpgp.worker.min.js
vendored
@ -1,2 +0,0 @@
|
||||
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
5
dist/lightweight/elliptic.min.js
vendored
5
dist/lightweight/elliptic.min.js
vendored
File diff suppressed because one or more lines are too long
39331
dist/lightweight/openpgp.js
vendored
39331
dist/lightweight/openpgp.js
vendored
File diff suppressed because one or more lines are too long
2
dist/lightweight/openpgp.min.js
vendored
2
dist/lightweight/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
173
dist/lightweight/openpgp.worker.js
vendored
173
dist/lightweight/openpgp.worker.js
vendored
@ -1,173 +0,0 @@
|
||||
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
(function (global){
|
||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||
// Copyright (C) 2011 Recurity Labs GmbH
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 3.0 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
/* eslint-disable no-restricted-globals */
|
||||
/* eslint-disable no-var */
|
||||
/* eslint-disable vars-on-top */
|
||||
|
||||
/**
|
||||
* @fileoverview Provides functions for communicating with workers
|
||||
* @see module:openpgp.initWorker
|
||||
* @see module:openpgp.getWorker
|
||||
* @see module:openpgp.destroyWorker
|
||||
* @see module:worker/async_proxy
|
||||
* @module worker/worker
|
||||
*/
|
||||
|
||||
importScripts('openpgp.js');
|
||||
var openpgp = global.openpgp;
|
||||
|
||||
var randomQueue = [];
|
||||
var MAX_SIZE_RANDOM_BUFFER = 60000;
|
||||
|
||||
/**
|
||||
* Handle random buffer exhaustion by requesting more random bytes from the main window
|
||||
* @returns {Promise<Object>} Empty promise whose resolution indicates that the buffer has been refilled
|
||||
*/
|
||||
function randomCallback() {
|
||||
|
||||
if (!randomQueue.length) {
|
||||
self.postMessage({ event: 'request-seed', amount: MAX_SIZE_RANDOM_BUFFER });
|
||||
}
|
||||
|
||||
return new Promise(function(resolve) {
|
||||
randomQueue.push(resolve);
|
||||
});
|
||||
}
|
||||
|
||||
openpgp.crypto.random.randomBuffer.init(MAX_SIZE_RANDOM_BUFFER, randomCallback);
|
||||
|
||||
/**
|
||||
* Handle messages from the main window.
|
||||
* @param {Object} event Contains event type and data
|
||||
*/
|
||||
self.onmessage = function(event) {
|
||||
var msg = event.data || {};
|
||||
|
||||
switch (msg.event) {
|
||||
case 'configure':
|
||||
configure(msg.config);
|
||||
break;
|
||||
|
||||
case 'seed-random':
|
||||
seedRandom(msg.buf);
|
||||
|
||||
var queueCopy = randomQueue;
|
||||
randomQueue = [];
|
||||
for (var i = 0; i < queueCopy.length; i++) {
|
||||
queueCopy[i]();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
delegate(msg.id, msg.event, msg.options || {});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Set config from main context to worker context.
|
||||
* @param {Object} config The openpgp configuration
|
||||
*/
|
||||
function configure(config) {
|
||||
Object.keys(config).forEach(function(key) {
|
||||
openpgp.config[key] = config[key];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Seed the library with entropy gathered global.crypto.getRandomValues
|
||||
* as this api is only avalible in the main window.
|
||||
* @param {ArrayBuffer} buffer Some random bytes
|
||||
*/
|
||||
function seedRandom(buffer) {
|
||||
if (!(buffer instanceof Uint8Array)) {
|
||||
buffer = new Uint8Array(buffer);
|
||||
}
|
||||
openpgp.crypto.random.randomBuffer.set(buffer);
|
||||
}
|
||||
|
||||
const keyCache = new Map();
|
||||
function getCachedKey(key) {
|
||||
const armor = key.armor();
|
||||
if (keyCache.has(armor)) {
|
||||
return keyCache.get(armor);
|
||||
}
|
||||
keyCache.set(armor, key);
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic proxy function that handles all commands from the public api.
|
||||
* @param {String} method The public api function to be delegated to the worker thread
|
||||
* @param {Object} options The api function's options
|
||||
*/
|
||||
function delegate(id, method, options) {
|
||||
if (method === 'clear-key-cache') {
|
||||
Array.from(keyCache.values()).forEach(key => {
|
||||
if (key.isPrivate()) {
|
||||
key.clearPrivateParams();
|
||||
}
|
||||
});
|
||||
keyCache.clear();
|
||||
response({ id, event: 'method-return' });
|
||||
return;
|
||||
}
|
||||
if (typeof openpgp[method] !== 'function') {
|
||||
response({ id:id, event:'method-return', err:'Unknown Worker Event' });
|
||||
return;
|
||||
}
|
||||
// construct ReadableStreams from MessagePorts
|
||||
openpgp.util.restoreStreams(options);
|
||||
// parse cloned packets
|
||||
options = openpgp.packet.clone.parseClonedPackets(options, method);
|
||||
// cache keys by armor, so that we don't have to repeatedly verify self-signatures
|
||||
if (options.publicKeys) {
|
||||
options.publicKeys = options.publicKeys.map(getCachedKey);
|
||||
}
|
||||
if (options.privateKeys) {
|
||||
options.privateKeys = options.privateKeys.map(getCachedKey);
|
||||
}
|
||||
openpgp[method](options).then(function(data) {
|
||||
// clone packets (for web worker structured cloning algorithm)
|
||||
response({ id:id, event:'method-return', data:openpgp.packet.clone.clonePackets(data) });
|
||||
}).catch(function(e) {
|
||||
openpgp.util.print_debug_error(e);
|
||||
response({
|
||||
id:id, event:'method-return', err:e.message, stack:e.stack
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Respond to the main window.
|
||||
* @param {Object} event Contains event type and data
|
||||
*/
|
||||
function response(event) {
|
||||
self.postMessage(event, openpgp.util.getTransferables(event.data, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Let the main window know the worker has loaded.
|
||||
*/
|
||||
postMessage({ event: 'loaded' });
|
||||
|
||||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{}]},{},[1]);
|
2
dist/lightweight/openpgp.worker.min.js
vendored
2
dist/lightweight/openpgp.worker.min.js
vendored
@ -1,2 +0,0 @@
|
||||
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
43718
dist/openpgp.js
vendored
43718
dist/openpgp.js
vendored
File diff suppressed because one or more lines are too long
2
dist/openpgp.min.js
vendored
2
dist/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
173
dist/openpgp.worker.js
vendored
173
dist/openpgp.worker.js
vendored
@ -1,173 +0,0 @@
|
||||
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
(function (global){
|
||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||
// Copyright (C) 2011 Recurity Labs GmbH
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 3.0 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
/* eslint-disable no-restricted-globals */
|
||||
/* eslint-disable no-var */
|
||||
/* eslint-disable vars-on-top */
|
||||
|
||||
/**
|
||||
* @fileoverview Provides functions for communicating with workers
|
||||
* @see module:openpgp.initWorker
|
||||
* @see module:openpgp.getWorker
|
||||
* @see module:openpgp.destroyWorker
|
||||
* @see module:worker/async_proxy
|
||||
* @module worker/worker
|
||||
*/
|
||||
|
||||
importScripts('openpgp.js');
|
||||
var openpgp = global.openpgp;
|
||||
|
||||
var randomQueue = [];
|
||||
var MAX_SIZE_RANDOM_BUFFER = 60000;
|
||||
|
||||
/**
|
||||
* Handle random buffer exhaustion by requesting more random bytes from the main window
|
||||
* @returns {Promise<Object>} Empty promise whose resolution indicates that the buffer has been refilled
|
||||
*/
|
||||
function randomCallback() {
|
||||
|
||||
if (!randomQueue.length) {
|
||||
self.postMessage({ event: 'request-seed', amount: MAX_SIZE_RANDOM_BUFFER });
|
||||
}
|
||||
|
||||
return new Promise(function(resolve) {
|
||||
randomQueue.push(resolve);
|
||||
});
|
||||
}
|
||||
|
||||
openpgp.crypto.random.randomBuffer.init(MAX_SIZE_RANDOM_BUFFER, randomCallback);
|
||||
|
||||
/**
|
||||
* Handle messages from the main window.
|
||||
* @param {Object} event Contains event type and data
|
||||
*/
|
||||
self.onmessage = function(event) {
|
||||
var msg = event.data || {};
|
||||
|
||||
switch (msg.event) {
|
||||
case 'configure':
|
||||
configure(msg.config);
|
||||
break;
|
||||
|
||||
case 'seed-random':
|
||||
seedRandom(msg.buf);
|
||||
|
||||
var queueCopy = randomQueue;
|
||||
randomQueue = [];
|
||||
for (var i = 0; i < queueCopy.length; i++) {
|
||||
queueCopy[i]();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
delegate(msg.id, msg.event, msg.options || {});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Set config from main context to worker context.
|
||||
* @param {Object} config The openpgp configuration
|
||||
*/
|
||||
function configure(config) {
|
||||
Object.keys(config).forEach(function(key) {
|
||||
openpgp.config[key] = config[key];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Seed the library with entropy gathered global.crypto.getRandomValues
|
||||
* as this api is only avalible in the main window.
|
||||
* @param {ArrayBuffer} buffer Some random bytes
|
||||
*/
|
||||
function seedRandom(buffer) {
|
||||
if (!(buffer instanceof Uint8Array)) {
|
||||
buffer = new Uint8Array(buffer);
|
||||
}
|
||||
openpgp.crypto.random.randomBuffer.set(buffer);
|
||||
}
|
||||
|
||||
const keyCache = new Map();
|
||||
function getCachedKey(key) {
|
||||
const armor = key.armor();
|
||||
if (keyCache.has(armor)) {
|
||||
return keyCache.get(armor);
|
||||
}
|
||||
keyCache.set(armor, key);
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic proxy function that handles all commands from the public api.
|
||||
* @param {String} method The public api function to be delegated to the worker thread
|
||||
* @param {Object} options The api function's options
|
||||
*/
|
||||
function delegate(id, method, options) {
|
||||
if (method === 'clear-key-cache') {
|
||||
Array.from(keyCache.values()).forEach(key => {
|
||||
if (key.isPrivate()) {
|
||||
key.clearPrivateParams();
|
||||
}
|
||||
});
|
||||
keyCache.clear();
|
||||
response({ id, event: 'method-return' });
|
||||
return;
|
||||
}
|
||||
if (typeof openpgp[method] !== 'function') {
|
||||
response({ id:id, event:'method-return', err:'Unknown Worker Event' });
|
||||
return;
|
||||
}
|
||||
// construct ReadableStreams from MessagePorts
|
||||
openpgp.util.restoreStreams(options);
|
||||
// parse cloned packets
|
||||
options = openpgp.packet.clone.parseClonedPackets(options, method);
|
||||
// cache keys by armor, so that we don't have to repeatedly verify self-signatures
|
||||
if (options.publicKeys) {
|
||||
options.publicKeys = options.publicKeys.map(getCachedKey);
|
||||
}
|
||||
if (options.privateKeys) {
|
||||
options.privateKeys = options.privateKeys.map(getCachedKey);
|
||||
}
|
||||
openpgp[method](options).then(function(data) {
|
||||
// clone packets (for web worker structured cloning algorithm)
|
||||
response({ id:id, event:'method-return', data:openpgp.packet.clone.clonePackets(data) });
|
||||
}).catch(function(e) {
|
||||
openpgp.util.print_debug_error(e);
|
||||
response({
|
||||
id:id, event:'method-return', err:e.message, stack:e.stack
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Respond to the main window.
|
||||
* @param {Object} event Contains event type and data
|
||||
*/
|
||||
function response(event) {
|
||||
self.postMessage(event, openpgp.util.getTransferables(event.data, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Let the main window know the worker has loaded.
|
||||
*/
|
||||
postMessage({ event: 'loaded' });
|
||||
|
||||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{}]},{},[1]);
|
2
dist/openpgp.worker.min.js
vendored
2
dist/openpgp.worker.min.js
vendored
@ -1,2 +0,0 @@
|
||||
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
1093
docs/AEADEncryptedDataPacket.html
Normal file
1093
docs/AEADEncryptedDataPacket.html
Normal file
File diff suppressed because one or more lines are too long
986
docs/Argon2S2K.html
Normal file
986
docs/Argon2S2K.html
Normal file
File diff suppressed because one or more lines are too long
1
docs/CNAME
Normal file
1
docs/CNAME
Normal file
@ -0,0 +1 @@
|
||||
docs.openpgpjs.org
|
1366
docs/CleartextMessage.html
Normal file
1366
docs/CleartextMessage.html
Normal file
File diff suppressed because one or more lines are too long
1012
docs/CompressedDataPacket.html
Normal file
1012
docs/CompressedDataPacket.html
Normal file
File diff suppressed because one or more lines are too long
5397
docs/Key.html
Normal file
5397
docs/Key.html
Normal file
File diff suppressed because one or more lines are too long
1590
docs/LiteralDataPacket.html
Normal file
1590
docs/LiteralDataPacket.html
Normal file
File diff suppressed because one or more lines are too long
348
docs/MarkerPacket.html
Normal file
348
docs/MarkerPacket.html
Normal file
File diff suppressed because one or more lines are too long
4870
docs/Message.html
Normal file
4870
docs/Message.html
Normal file
File diff suppressed because one or more lines are too long
1019
docs/OnePassSignaturePacket.html
Normal file
1019
docs/OnePassSignaturePacket.html
Normal file
File diff suppressed because one or more lines are too long
1283
docs/PacketList.html
Normal file
1283
docs/PacketList.html
Normal file
File diff suppressed because one or more lines are too long
600
docs/PaddingPacket.html
Normal file
600
docs/PaddingPacket.html
Normal file
File diff suppressed because one or more lines are too long
1893
docs/PrivateKey.html
Normal file
1893
docs/PrivateKey.html
Normal file
File diff suppressed because one or more lines are too long
618
docs/PublicKey.html
Normal file
618
docs/PublicKey.html
Normal file
File diff suppressed because one or more lines are too long
967
docs/PublicKeyEncryptedSessionKeyPacket.html
Normal file
967
docs/PublicKeyEncryptedSessionKeyPacket.html
Normal file
File diff suppressed because one or more lines are too long
2472
docs/PublicKeyPacket.html
Normal file
2472
docs/PublicKeyPacket.html
Normal file
File diff suppressed because one or more lines are too long
2586
docs/PublicSubkeyPacket.html
Normal file
2586
docs/PublicSubkeyPacket.html
Normal file
File diff suppressed because one or more lines are too long
3852
docs/SecretKeyPacket.html
Normal file
3852
docs/SecretKeyPacket.html
Normal file
File diff suppressed because one or more lines are too long
3921
docs/SecretSubkeyPacket.html
Normal file
3921
docs/SecretSubkeyPacket.html
Normal file
File diff suppressed because one or more lines are too long
629
docs/Signature.html
Normal file
629
docs/Signature.html
Normal file
File diff suppressed because one or more lines are too long
1848
docs/SignaturePacket.html
Normal file
1848
docs/SignaturePacket.html
Normal file
File diff suppressed because one or more lines are too long
846
docs/SymEncryptedIntegrityProtectedDataPacket.html
Normal file
846
docs/SymEncryptedIntegrityProtectedDataPacket.html
Normal file
File diff suppressed because one or more lines are too long
1102
docs/SymEncryptedSessionKeyPacket.html
Normal file
1102
docs/SymEncryptedSessionKeyPacket.html
Normal file
File diff suppressed because one or more lines are too long
810
docs/SymmetricallyEncryptedDataPacket.html
Normal file
810
docs/SymmetricallyEncryptedDataPacket.html
Normal file
File diff suppressed because one or more lines are too long
277
docs/TrustPacket.html
Normal file
277
docs/TrustPacket.html
Normal file
File diff suppressed because one or more lines are too long
600
docs/UserAttributePacket.html
Normal file
600
docs/UserAttributePacket.html
Normal file
File diff suppressed because one or more lines are too long
668
docs/UserIDPacket.html
Normal file
668
docs/UserIDPacket.html
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/fonts/OpenSans-Bold-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Bold-webfont.eot
Normal file
Binary file not shown.
1830
docs/fonts/OpenSans-Bold-webfont.svg
Normal file
1830
docs/fonts/OpenSans-Bold-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 116 KiB |
BIN
docs/fonts/OpenSans-Bold-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Bold-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-BoldItalic-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-BoldItalic-webfont.eot
Normal file
Binary file not shown.
1830
docs/fonts/OpenSans-BoldItalic-webfont.svg
Normal file
1830
docs/fonts/OpenSans-BoldItalic-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 118 KiB |
BIN
docs/fonts/OpenSans-BoldItalic-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-BoldItalic-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-Italic-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Italic-webfont.eot
Normal file
Binary file not shown.
1830
docs/fonts/OpenSans-Italic-webfont.svg
Normal file
1830
docs/fonts/OpenSans-Italic-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 120 KiB |
BIN
docs/fonts/OpenSans-Italic-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Italic-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-Light-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Light-webfont.eot
Normal file
Binary file not shown.
1831
docs/fonts/OpenSans-Light-webfont.svg
Normal file
1831
docs/fonts/OpenSans-Light-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 114 KiB |
BIN
docs/fonts/OpenSans-Light-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Light-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-LightItalic-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-LightItalic-webfont.eot
Normal file
Binary file not shown.
1835
docs/fonts/OpenSans-LightItalic-webfont.svg
Normal file
1835
docs/fonts/OpenSans-LightItalic-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 120 KiB |
BIN
docs/fonts/OpenSans-LightItalic-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-LightItalic-webfont.woff
Normal file
Binary file not shown.
BIN
docs/fonts/OpenSans-Regular-webfont.eot
Normal file
BIN
docs/fonts/OpenSans-Regular-webfont.eot
Normal file
Binary file not shown.
1831
docs/fonts/OpenSans-Regular-webfont.svg
Normal file
1831
docs/fonts/OpenSans-Regular-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 117 KiB |
BIN
docs/fonts/OpenSans-Regular-webfont.woff
Normal file
BIN
docs/fonts/OpenSans-Regular-webfont.woff
Normal file
Binary file not shown.
11739
docs/global.html
Normal file
11739
docs/global.html
Normal file
File diff suppressed because one or more lines are too long
723
docs/index.html
Normal file
723
docs/index.html
Normal file
File diff suppressed because one or more lines are too long
4015
docs/module-config.html
Normal file
4015
docs/module-config.html
Normal file
File diff suppressed because one or more lines are too long
184
docs/module-crypto.html
Normal file
184
docs/module-crypto.html
Normal file
File diff suppressed because one or more lines are too long
604
docs/module-crypto_aes_kw.html
Normal file
604
docs/module-crypto_aes_kw.html
Normal file
File diff suppressed because one or more lines are too long
400
docs/module-crypto_cipherMode.html
Normal file
400
docs/module-crypto_cipherMode.html
Normal file
File diff suppressed because one or more lines are too long
413
docs/module-crypto_cmac.html
Normal file
413
docs/module-crypto_cmac.html
Normal file
File diff suppressed because one or more lines are too long
2655
docs/module-crypto_crypto.html
Normal file
2655
docs/module-crypto_crypto.html
Normal file
File diff suppressed because one or more lines are too long
525
docs/module-crypto_hash.html
Normal file
525
docs/module-crypto_hash.html
Normal file
File diff suppressed because one or more lines are too long
167
docs/module-crypto_hkdf.html
Normal file
167
docs/module-crypto_hkdf.html
Normal file
File diff suppressed because one or more lines are too long
710
docs/module-crypto_mode_cfb.html
Normal file
710
docs/module-crypto_mode_cfb.html
Normal file
File diff suppressed because one or more lines are too long
748
docs/module-crypto_mode_eax.html
Normal file
748
docs/module-crypto_mode_eax.html
Normal file
File diff suppressed because one or more lines are too long
334
docs/module-crypto_mode_gcm.html
Normal file
334
docs/module-crypto_mode_gcm.html
Normal file
File diff suppressed because one or more lines are too long
747
docs/module-crypto_mode_ocb.html
Normal file
747
docs/module-crypto_mode_ocb.html
Normal file
File diff suppressed because one or more lines are too long
882
docs/module-crypto_pkcs1.html
Normal file
882
docs/module-crypto_pkcs1.html
Normal file
File diff suppressed because one or more lines are too long
167
docs/module-crypto_public_key.html
Normal file
167
docs/module-crypto_public_key.html
Normal file
File diff suppressed because one or more lines are too long
1084
docs/module-crypto_public_key_dsa.html
Normal file
1084
docs/module-crypto_public_key_dsa.html
Normal file
File diff suppressed because one or more lines are too long
981
docs/module-crypto_public_key_elgamal.html
Normal file
981
docs/module-crypto_public_key_elgamal.html
Normal file
File diff suppressed because one or more lines are too long
180
docs/module-crypto_public_key_elliptic.html
Normal file
180
docs/module-crypto_public_key_elliptic.html
Normal file
File diff suppressed because one or more lines are too long
1240
docs/module-crypto_public_key_elliptic_curve.html
Normal file
1240
docs/module-crypto_public_key_elliptic_curve.html
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user