PostgreSQL keyring storage for node-pgp.

node-pgp-postgres is a PostgreSQL backend for node-pgp. It provides an implementation of the Keyring class that stores keys in database tables.

Use the following code to create an instance of the Keyring class:

var pgpPg = require("node-pgp-postgres");
pgpPg.getKeyring("postgres://postgres@localhost/database", function(errkeyring) {
        ; // An error occurred 
    // Now we do some stuff with the keyring 
    // Once we are finished, we release the database connection: 
}, true); // If the last parameter is set to true, the database layout will be initialised automatically 

The connection string uses the format of node-postgres. It may also be specified as an object of the following format:

    user: "postgres",
    password: "password",
    host: "localhost",
    port: 1234,
    database: "database",
    schema: "public"