Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@inquirer/prompts": "8.5.2",
"@internxt/inxt-js": "3.3.5",
"@internxt/lib": "1.5.1",
"@internxt/sdk": "1.17.17",
"@oclif/core": "4.13.0",
"@oclif/plugin-autocomplete": "3.2.53",
"@internxt/sdk": "1.19.0",
"@oclif/core": "4.13.2",
"@oclif/plugin-autocomplete": "3.2.54",
"axios": "1.18.1",
"better-sqlite3": "12.11.1",
"bip39": "3.1.0",
Expand Down Expand Up @@ -73,15 +73,15 @@
"@types/cli-progress": "^3.11.6",
"@types/express": "^5.0.6",
"@types/mime-types": "^3.0.1",
"@types/node": "^26.1.1",
"@types/node": "^26.1.2",
"@types/range-parser": "^1.2.7",
"@vitest/coverage-istanbul": "^4.1.10",
"@vitest/spy": "^4.1.10",
"eslint": "^10.8.0",
"husky": "^9.1.7",
"lint-staged": "^17.2.0",
"nodemon": "^3.1.14",
"oclif": "^4.23.27",
"oclif": "^4.23.29",
"prettier": "^3.9.6",
"rimraf": "^6.1.3",
"sql.js": "^1.14.1",
Expand Down
5 changes: 1 addition & 4 deletions src/services/crypto.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ export class CryptoService {
return CryptoService.instance.encryptText(hashObj.hash);
},
async generateKeys(password: Password): Promise<Keys> {
const { privateKeyArmoredEncrypted, publicKeyArmored, revocationCertificate } =
const { privateKeyArmoredEncrypted, publicKeyArmored } =
await KeysService.instance.generateNewKeysWithEncrypted(password);
const keys: Keys = {
privateKeyEncrypted: privateKeyArmoredEncrypted,
publicKey: publicKeyArmored,
revocationCertificate: revocationCertificate,
ecc: {
privateKeyEncrypted: privateKeyArmoredEncrypted,
publicKey: publicKeyArmored,
Expand Down
3 changes: 0 additions & 3 deletions test/services/crypto.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ describe('Crypto service', () => {
.mockResolvedValue(keysReturned);

const expectedKeys: Keys = {
privateKeyEncrypted: keysReturned.privateKeyArmoredEncrypted,
publicKey: keysReturned.publicKeyArmored,
revocationCertificate: keysReturned.revocationCertificate,
ecc: {
privateKeyEncrypted: keysReturned.privateKeyArmoredEncrypted,
publicKey: keysReturned.publicKeyArmored,
Expand Down
5 changes: 3 additions & 2 deletions test/services/keys.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ describe('Keys service', () => {
});

test('when new encryption keys are needed, then they are generated using the cryptography library', async () => {
interface KeyPair {
interface PgpGenerationKeys {
privateKey: openpgp.PrivateKey;
publicKey: openpgp.PublicKey;
revocationCertificate: string;
}

const pgpKeys = {
privateKey: crypto.randomBytes(16).toString('hex'),
publicKey: crypto.randomBytes(16).toString('hex'),
revocationCertificate: crypto.randomBytes(16).toString('hex'),
} as unknown as KeyPair & { revocationCertificate: string };
} as unknown as PgpGenerationKeys;

const pgpKeysWithEncrypted = {
privateKeyArmored: pgpKeys.privateKey,
Expand Down
Loading