bricous / meteor-server-encryption

Encryption using Crypto AES and Collection Hook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meteor Server Encryption

Server side collection encryption using Crypto AES and Collection Hook

Please refer to History.md for a summary of recent changes.

Getting Started

Installation:

meteor add escu:encryption

Encrypt Collection

Specify your collection and fields to encrypt.

var TestCollection = new Mongo.Collection('test');

Meteor.startup(function() {
  if (Meteor.isServer) {
    EncryptCollection(TestCollection, ['field1', 'field2']);
  }
});

Decrypt Collection

Specify your collection and fields to decrypt.

Meteor.startup(function() {
  if (Meteor.isClient) {
    DecryptCollection(TestCollection, ['field1', 'field2']);
  }
}

Encryption options

Passphrase

Specify your collection and fields to decrypt.

Encryption.passphrase('passphrase');

Important: Should be defined on both server and client.


Maintainer

  • John Edward Escuyos (jeescu)

About

Encryption using Crypto AES and Collection Hook


Languages

Language:JavaScript 100.0%