Skip to content

Instantly share code, notes, and snippets.

View karan9's full-sized avatar
🏠
Working from home

Karan Srivastava karan9

🏠
Working from home
View GitHub Profile
@karan9
karan9 / hello_world_shell_local.js
Created October 26, 2020 10:56 — forked from kennwhite/hello_world_shell_local.js
MongoDB Client Side Field Level Encryption Quickstart Part 2 (local key version)
/*
Simple demonstration using MongoDB Client-Side Field Level Encryption (local key version)
Requires Community or (preferrably) Enterprise Shell and a MongoDB 4.2+ database
Local, stand-alone, or Atlas MongoDB will all work.
To use this, just open Mongo shell, with this file, e.g.:
mongo --nodb --shell hello_world_shell_local.js
# For a self-signed cert: mongo --tls --tlsCAFile /opt/mongodb/certs/ca.pem --shell hello_world_shell_local.js