OpenSSL::PKCS5.pbkdf2_hmac
has been renamed to OpenSSL::KDF.pbkdf2_hmac
. This method is provided for backwards compatibility.
PKCS #5 PBKDF2 (Password-Based Key Derivation Function 2) in combination with HMAC
. Takes pass, salt and iterations, and then derives a key of length bytes.
For more information about PBKDF2, see RFC 2898 Section 5.2 (tools.ietf.org/html/rfc2898#section-5.2).
The passphrase.
The salt. Salts prevent attacks based on dictionaries of common passwords and attacks based on rainbow tables. It is a public value that can be safely stored along with the password (e.g. if the derived value is used for password storage).
The iteration count. This provides the ability to tune the algorithm. It is better to use the highest count possible for the maximum resistance to brute-force attacks.
The desired length of the derived key in octets.
The hash algorithm used with HMAC
for the PRF. May be a String representing the algorithm name, or an instance of OpenSSL::Digest
.
Generates a mask bit for a priority level. See mask=
Generate an Image Button Input element as a string.
src
is the URL of the image to use for the button. name
is the input name. alt
is the alternative text for the image.
Alternatively, the attributes can be specified as a hash.
image_button("url") # <INPUT TYPE="image" SRC="url"> image_button("url", "name", "string") # <INPUT TYPE="image" SRC="url" NAME="name" ALT="string"> image_button("SRC" => "url", "ALT" => "string") # <INPUT TYPE="image" SRC="url" ALT="string">
Returns a content type string such as “text”. This method returns nil if Content-Type: header field does not exist.
UNTESTED
Adds a maker to the set of supported makers
Wraps text
to wrap
characters and optionally indents by indent
characters
Normalizes a request path. Raises an exception if the path cannot be normalized.
Normalizes a request path. Raises an exception if the path cannot be normalized.
Convenience method for Shell::CommandProcessor.def_system_command
. Defines an instance method which will execute the given shell command. If the executable is not in Shell.default_system_path
, you must supply the path to it.
Shell.def_system_command('hostname') Shell.new.hostname # => localhost # How to use an executable that's not in the default path Shell.def_system_command('run_my_program', "~/hello") Shell.new.run_my_program # prints "Hello from a C program!"
Convenience method for Shell::CommandProcessor.undef_system_command
Convenience method for Shell::CommandProcessor.install_system_commands. Defines instance methods representing all the executable files found in Shell.default_system_path
, with the given prefix prepended to their names.
Shell.install_system_commands Shell.new.sys_echo("hello") # => hello
Specifies Emacs editing mode. The default is this mode. See the manual of GNU Readline
for details of Emacs editing mode.
Raises NotImplementedError
if the using readline library does not support.
Returns true if emacs mode is active. Returns false if not.
Raises NotImplementedError
if the using readline library does not support.
Returns the size of memory allocated by malloc().
Only available if ruby was built with CALC_EXACT_MALLOC_SIZE
.
Deduce Ruby’s –program-prefix and –program-suffix from its install name