(b64url)
| 50 | } |
| 51 | |
| 52 | function base64UrlToBuffer(b64url) { |
| 53 | const pad = '='.repeat((4 - (b64url.length % 4)) % 4); |
| 54 | const b64 = (b64url + pad).replace(/-/g, '+').replace(/_/g, '/'); |
| 55 | return Buffer.from(b64, 'base64'); |
| 56 | } |
| 57 | |
| 58 | function encrypt() { |
| 59 | if (!existsSync(PLAINTEXT_PATH)) { |