CuriousNewbie
2010-Nov-25 16:53 UTC
Creating a Secure ID/UID for a Password, token authentication type system
Hello, I''m looking for a way to create a very secure UID that will act as a authentication token. I had been using the UUID gem but learned they are not secure. I''d like to learn what to use. What is the method of choice these days in ruby/rails 3? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Nov-25 17:26 UTC
Re: Creating a Secure ID/UID for a Password, token authentication type system
On Nov 25, 4:53 pm, CuriousNewbie <bhellm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, I''m looking for a way to create a very secure UID that will act > as a authentication token. > > I had been using the UUID gem but learned they are not secure. I''d > like to learn what to use. What is the method of choice these days in > ruby/rails 3?ActiveSupport::SecureRandom can generate cryptographically secure (assuming there is underlying OS support) random bytes (On ruby 1.9 I believe this is built in and you don''t need to use Active Support) Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.