mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 09:57:50 +08:00
35 lines
871 B
TypeScript
35 lines
871 B
TypeScript
// Suppress OpenPGP.js AES cipher warnings
|
|
const originalWarn = console.warn;
|
|
const originalError = console.error;
|
|
|
|
console.warn = (...args: any[]) => {
|
|
const msg = args[0]?.toString() || '';
|
|
if (msg.includes('AES-CBC') || msg.includes('AES-CTR') || msg.includes('authentication')) {
|
|
return;
|
|
}
|
|
originalWarn.apply(console, args);
|
|
};
|
|
|
|
console.error = (...args: any[]) => {
|
|
const msg = args[0]?.toString() || '';
|
|
if (msg.includes('AES-CBC') || msg.includes('AES-CTR') || msg.includes('authentication')) {
|
|
return;
|
|
}
|
|
originalError.apply(console, args);
|
|
};
|
|
|
|
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import './index.css'
|
|
import App from './App'
|
|
|
|
if (import.meta.env.DEV) {
|
|
await import('./lib/sessionCrypto');
|
|
}
|
|
|
|
createRoot(document.getElementById('root')!).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
)
|