论坛首页 编程语言技术论坛

#2008-01-11 UUID to generate security_key

浏览 1765 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-01-11  
How to

1 Install
On DOS command , type this

gem install uuidtools

2 require
Add to top line on application.rb
require 'uuidtools'

Let's create
key = UUID.random_create().to_s>> UUID.random_create().to_s
UUID.random_create().to_s
=> "003b9ae0-0485-11dc-a799-005056c00008"
>> UUID.random_create().to_s
UUID.random_create().to_s
=> "051f4890-0485-11dc-a799-005056c00008"
>> UUID.random_create().to_s
UUID.random_create().to_s
=> "06b48e90-0485-11dc-a799-005056c00008"
>> UUID.random_create().to_s
UUID.random_create().to_s
=> "081ef400-0485-11dc-a799-005056c00008"
论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics