How to use the kdbxweb.VarDictionary function in kdbxweb

To help you get started, we’ve selected a few kdbxweb 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 keeweb / keeweb / app / scripts / models / file-model.js View on Github external
setKdfParameter(field, value) {
        const ValueType = kdbxweb.VarDictionary.ValueType;
        switch (field) {
            case 'memory':
                this.db.header.kdfParameters.set('M', ValueType.UInt64, kdbxweb.Int64.from(value));
                break;
            case 'iterations':
                this.db.header.kdfParameters.set('I', ValueType.UInt64, kdbxweb.Int64.from(value));
                break;
            case 'parallelism':
                this.db.header.kdfParameters.set('P', ValueType.UInt32, value);
                break;
            case 'rounds':
                this.db.header.kdfParameters.set('R', ValueType.UInt32, value);
                break;
            default:
                return;
        }