Class

SecretKeyGenerator

Extends:

There's no documentation for this item.

Constants
GENERATORS
Public Methods
generate_secret Generate a random secret key with the best possible method available on the current platform.
generate_secret_with_openssl Generate a random secret key with OpenSSL. If OpenSSL is not already loaded, then this method will attempt to load it. LoadError will be raised if that fails.
generate_secret_with_prng Generate a random secret key with Ruby’s pseudo random number generator, as well as some environment information.
generate_secret_with_secure_random Generate a random secret key with Ruby 1.9’s SecureRandom module. Raises LoadError if the current Ruby version does not support SecureRandom.
generate_secret_with_urandom Generate a random secret key with /dev/urandom. Raises SystemCallError on failure.
generate_secret_with_win32_api Generate a random secret key by using the Win32 API. Raises LoadError if the current platform cannot make use of the Win32 API. Raises SystemCallError if some other error occured.
new
Private Methods
lastWin32ErrorMessage
supports_openssl?
supports_prng?
supports_secure_random?
supports_urandom?
supports_win32_api?
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.