Refactor chat encryption to use sodium, update API
Replaces legacy chat encryption modules with new sodium-based implementation. Adds and updates API routes for chat key management and debugging, introduces new hooks and scripts for sodium chat, and updates related database schema and configuration. Removes old crypto modules and updates dependencies accordingly.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { db } from '../src/db';
|
||||
import { chatDeviceBundles } from '../src/db/schema';
|
||||
|
||||
async function clearChatKeys() {
|
||||
console.log('Clearing all chat device bundles...');
|
||||
|
||||
const result = await db.delete(chatDeviceBundles);
|
||||
|
||||
console.log('Cleared chat device bundles');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
clearChatKeys().catch((error) => {
|
||||
console.error('Failed to clear keys:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user