refactoring

This commit is contained in:
hsueh chiahao
2025-10-16 14:03:28 +08:00
parent 6ab2c95990
commit b35bd159a8
8 changed files with 118 additions and 89 deletions

12
scripts/privateKey.ts Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
// @ts-ignore
import RSA from 'node-rsa';
/**
* Create a private key for a kintone plugin
* Copy from https://github.com/kintone/js-sdk/blob/main/packages/create-plugin/src/privateKey.ts
*/
export const generatePrivateKey = () => {
const key = new RSA({ b: 1024 });
return key.exportKey('pkcs1-private');
};