-
Notifications
You must be signed in to change notification settings - Fork 0
/
Code.gs
81 lines (76 loc) · 4.12 KB
/
Code.gs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
const privateKeyArmored = `-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: cc
xcNVBGKjT4YBB/4mxmqelVW8I44G4s7cjl9Cy8tSHh3iV5y/VmVUjIQE2gZx0v5G
Ulkbt+oSjIVtpOdrj42SVWdxKm0Ya+7A67yrYEZhgsPVvGBms3WSNBkhM4B64Fc9
ZNmmC1R9vkvsm851Q/Ud+0uNky4YfrzB7uJAVz9Kq2BeK7qcAyPGM+JiDf+/F+LW
bK7WL7l/leZXRiAMo+xbDkc3Gf7WfYWEDMUjnAGYrwjRGvgq0nlQaWmFMgmckg1T
FI7LLsvomFxdlJWrt1Rv50RbUT/kWMVc35hMcAMWHr2igy/NgqqsevPRxJkKvFAO
bPRPx8phuH70mhclOIZKyHB9fDxkyN8QAmUfA/97yAtpvW7vAn1OPp8F/o6NsRCC
yp1ilfwvX7P+SjUlkPf3J0oBMXUMLcw3Sq48JFPy+3v9FasC/jsMDTy3TRgSQaza
Alp2F9sSJZx98PtdOCDezXGBS6qZy35RXvCWiQUEjpMYbyTnmAwetD7oXif0lpp2
9zuyCamCvo8FRkTDMwAH/Rh6L5oCnx5P/tn/6JCXur82sGojtUqGAsAoqnJHvPDt
G4C1ZfpQQIGnvESEFN5ZOykMAYaqbbiZu+agnow66lpaCuUaXInhNjmUCzyVwfMn
JVy1F5GXnzjytxsshT1l1E1nRGzXCz0VwRHHSfpc0BITRy0vC/QDNZFAEsQR95KG
FIe46nf+px5se1DO0yaxBMZ5Xg0IgFu62UOk4REc/k4IMCBghYfcLuDHemXJPGX/
x1/eKLn4573+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nN5BQQArdPgJgEEopswJY1U0naBh4MrwZV3CtWHJgXvIJEaGYl7dGRz
5nhy9ATtiPAWdXSGeNNu+bo15nvlqyJ9g4W9XK038tVVXAiZMaaIs/UbTaYSWi0o
aqgoenxwFH/RTvc91fdLMVhhKJdiiSCAV0W5rgPt9yMEEVQHSR1Js1rPg60D+wSj
0DYhGlhn8hoUL63Dld5L1RFKjz2JGuaL78EaG/35AJAGE901g4quQayVZXZNqHw3
/bDMCaPh+RIcVF80sUNDF37J9DiZaagnt2K/C+H3eFAQ/x27MJJIyM4bKseekZQ4
eMC+ffMCUE8cNbTHn7WmL+0ORaIoP38vgt1OxnndPFnCwFwEGAECAAYFAmKjT4YA
CgkQF4NdTxwTJClv1gf9EKjVGGJP4Lr5fgTPYWUykZcg/qA2sUv8oJYK743Izb3K
u1Ddsvca0rq+dFUnoYOAgHoMPaEnCSLWYsV08sBklTfIwGWTDh4EMVEWN0xwA7Uy
Ndej2yFOVUD1QfQX+HsIti5N+7Ib/GOQIXsxuU/IXyCFjcYqA0uYp5wtNHGowQ3L
qci582En5Lrjm5irN8wkhULrFqpWEG8xBozqJKgyDUDxbwF1xQyN8ZBJa0jiLVBR
GeqxcpPRkr1/Y/A/3sLxeXLWQGISgC69t48inJjYKdf/sX3U2HK3kpd4mgJs9sXn
3y3hPts+pEklwiVwdsZy3OQzJZ6T9EritJ8djDHCvQ==
=KJiY
-----END PGP PRIVATE KEY BLOCK-----`;
async function main() {
const cleartextMsg = await openpgp.createCleartextMessage({
text: 'Hello, World!'
});
console.log(cleartextMsg);
const privateKey = await openpgp.readPrivateKey({
armoredKey: privateKeyArmored,
config: { minRSABits: 2046 }
});
const signedMessage = await openpgp.sign({
message: cleartextMsg,
signingKeys: privateKey
});
console.log(signedMessage);
}