How to use the iocane.crypto.decryptWithPassword function in iocane

To help you get started, we’ve selected a few iocane 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 buttercup / buttercup-core / source / node / system / TextDatasource.js View on Github external
.then(function __decryptUsingPassword(encryptedData) {
            // optionally decrypt using a password
            return password ? iocane.decryptWithPassword(encryptedData, password) : encryptedData;
        })
        .then(function __marshallHistoryToArray(decrypted) {
github buttercup / buttercup-core / source / classes / Credentials.js View on Github external
Credentials.createFromSecureContent = function(content, password) {
    return iocane
        .decryptWithPassword(unsignEncryptedContent(content), password)
        .then((decryptedContent) => new Credentials(JSON.parse(decryptedContent)));
};
github buttercup / buttercup-core / source / node / system / credentials.js View on Github external
static fromSecureString(content, password) {
        return iocane
            .decryptWithPassword(unsignEncryptedContent(content), password)
            .then(decryptedContent => JSON.parse(decryptedContent))
            .then(
                credentialsData =>
                    Array.isArray(credentialsData)
                        ? new Credentials({ ...credentialsData[1], type: credentialsData[0] })
                        : new Credentials(credentialsData)
            );
    }