ri > ActiveSupport::KeyGenerator

📚 NAME

ActiveSupport::KeyGenerator < Object — A simple wrapper around OpenSSL's PBKDF2 implementation for deriving multiple keys from a single secret.


Source: /home/chedong/.local/share/rdoc

🚀 Quick Reference

Use CaseCommandDescription
Create a new key generatorActiveSupport::KeyGenerator.new(secret, options = {})Initialize a generator with a master secret and optional hash digest/iterations
Generate a derived keygenerator.generate_key(salt, key_length = 64)Derive a key of specified length using PBKDF2 with the given salt

📝 Description

KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. It can be used to derive a number of keys for various purposes from a given secret. This lets Rails applications have a single secure secret, but avoid reusing that key in multiple incompatible contexts.

🔧 Class Methods

⚙️ Instance Methods

ActiveSupport::KeyGenerator
📚 NAME 🚀 Quick Reference 📝 Description 🔧 Class Methods ⚙️ Instance Methods

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 18:51 @216.73.216.199
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format