lib/vidibus/secure.rb in vidibus-secure-0.1.3 vs lib/vidibus/secure.rb in vidibus-secure-0.1.4

- old
+ new

@@ -15,11 +15,11 @@ :crypt => { :algorithm => "AES-256-CBC", :encoding => :base64 } } end # Returns a truly random string. - # Now it is not much more than an interface for ActiveSupport::SecureRandom, + # Now it is not much more than an interface for Ruby's SecureRandom, # but that might change over time. # # Options: # :length Length of string to generate # :encoding Encoding of string; hex or base64 @@ -28,10 +28,10 @@ # than a base64 encoded string with the same length! # def random(options = {}) options = settings[:random].merge(options) length = options[:length] - ActiveSupport::SecureRandom.send(options[:encoding], length)[0,length] + SecureRandom.send(options[:encoding], length)[0,length] end # Returns signature of given data with given key. def sign(data, key, options = {}) raise KeyError.new("Please provide a secret key to sign data with.") unless key