Skip to content

0.0.4

Choose a tag to compare

@katafrakt katafrakt released this 26 Oct 20:06
· 3 commits to main since this release
  • Add ROM plugin support
class SecretNotes < ::ROM::Relation[:sql]
  schema(:secret_notes, infer: true) do
    use :encrypted_attributes
    encrypt :content
  end
end
  • Add global configuration which supports ROM plugin
ROM::EncryptedAttribute.configure do |config|
  config.primary_key = "your-primary-key" # required
  config.key_derivation_salt = "your-derivation-salt" # required
  config.hash_digest_class = OpenSSL::Digest::SHA256 # SHA1 by default
end