Thoughts on this? 

https://github.com/jmazzi/crypt_keeper/blob/6d5c85bf079b93608cd7881d996cf1ce7ba87c11/lib/crypt_keeper/provider/postgres_pgp_public_key.rb#L25-L42

On Dec 12, 2013, at 4:19 PM, Mike Boone <notifications@github.com> wrote:

> In spec/provider/postgres_pgp_public_key_spec.rb:
> 
> > +          specify { subject.encrypt(plain_text).should_not be_empty }
> > +        end
> > +
> > +        context "Integers" do
> > +          specify { subject.encrypt(integer_plain_text).should_not == integer_plain_text }
> > +          specify { subject.encrypt(integer_plain_text).should_not be_empty }
> > +        end
> > +      end
> > +
> > +      describe "#decrypt" do
> > +        specify { subject.decrypt(cipher_text).should == plain_text }
> > +        specify { subject.decrypt(integer_cipher_text).should == integer_plain_text.to_s }
> > +
> > +        it "does not decrypt w/o private key" do
> > +          pgp = PostgresPgpPublicKey.new key: ENCRYPTION_PASSWORD, public_key: public_key
> > +          pgp.decrypt(cipher_text).should be_nil
> @jmazzi attr_readonly is supposed to allow writes when an object is created. But yeah, it would prevent updates.
> 
> —
> Reply to this email directly or view it on GitHub.
>