Sha256: 985257af3ce019278df2e2cb8fb97f7c072e6f42b6d89c93b23e28780a5e35fe

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

require "digest/sha1"
require "configatron"

require "ankh/question"

require "ankh/validations/human_validator"

require "ankh/model"
require "ankh/railtie" if defined?(Rails)

module Ankh
  def self.salt=(salt)
    configatron.ankh.salt = salt
  end
  
  def self.salt
    configatron.ankh.salt ||= 'fqphweuyir8y34295yu234y5219pthfsdlhgfsaf'
  end
  
  def self.encrypt(item_to_encrypt)
    Digest::SHA1.hexdigest("--#{salt}--#{item_to_encrypt}")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ankh-0.2.0 lib/ankh.rb