1.0.2 • Published 7 years ago
mongoose-plugin-rsa v1.0.2
mongoose-plugin-rsa
Automatic RSA keyPair generation on document creation.
Quickstart
- Load the plugin inside your schema
import {Schema} from 'mongoose';
import rsaPlugin from 'mongoose-plugin-rsa';
const schema = new Schema({
name: {type: String, required: true},
content: {type: Object, default: {}}
});
// Add RSA keypair generation
schema.plugin(rsaPlugin, {bits: 2048});
export default schema;
Testing
- You can quickly start hacking around
git clone -o github git@github.com:mgcrea/mongoose-plugin-rsa.git
cd mongoose-plugin-rsa
npm i
npm test