CipherStash Documentation

Loading a Collection

Before you can insert, delete, or query the records in a collection, you must first load it. This retrieves the collection metadata from the server and decrypts it, which provides local access to things like the keys used to encrypt data in the collection.

Collections are loaded by name with the Stash::Client#collection, like this:

require "cipherstash/client"

stash =

movies = stash.collection("movies")

If the collection does not exist, an exception will be raised.