How to use the @virgilsecurity/e3kit-browser.EThree.initialize function in @virgilsecurity/e3kit-browser

To help you get started, we’ve selected a few @virgilsecurity/e3kit-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VirgilSecurity / virgil-e3kit-js / examples / webpack / index.js View on Github external
(async () => {
    let message;
    try {
        const sdk = await EThree.initialize(getToken, {
            apiUrl: process.env.VIRGIL_API_URL,
        });
        await sdk.register();
        await sdk.backupPrivateKey('pa$$w0rd');
        const encryptedMessage = await sdk.encrypt('Success');
        message = await sdk.decrypt(encryptedMessage);
    } catch (error) {
        message = error.toString();
    } finally {
        const paragraph = document.createElement('p');
        const textNode = document.createTextNode(message);
        paragraph.appendChild(textNode);
        document.body.appendChild(paragraph);
    }
})();

@virgilsecurity/e3kit-browser

End-to-end encryption with multiple device support powered by Virgil Security

BSD-3-Clause
Latest version published 18 days ago

Package Health Score

67 / 100
Full package analysis

Similar packages