SixArm.com » Ruby » SecureToken to generate a cryptographic string that is web\

Author

Joel Parker Henderson, [email protected]

Copyright

Copyright © 2006-2010 Joel Parker Henderson

License

See LICENSE.txt

Secure random token generator to create strong secure text tokens.

Example

SecureToken.new => "kavzwbnxremyqlkwtxoimxzqpofmpove"

This generates a 32-character token of all lowercase letters, using Ruby’s securerandom methods.

SecureToken is a string, so you can do any string methods on it. You can change how tokens are randomly created, however you want.