Results for: "OptionParser"

Stops the server from accepting new connections.

Returns a Hash (not a DBM database) created by using each value in the database as a key, with the corresponding key as its value.

Note that all values in the hash will be Strings, but the keys will be actual objects.

If a block is provided, returns a new array containing [key, value] pairs for which the block returns true.

Otherwise, same as values_at

Returns true if this process is stopped. This is only returned if the corresponding wait call had the Process::WUNTRACED flag set.

Returns the number of the signal that caused stat to stop (or nil if self is not stopped).

Returns the number of the signal that caused stat to terminate (or nil if self was not terminated by an uncaught signal).

Resets the digest to the initial state and returns self.

This method is overridden by each implementation subclass.

If none is given, returns the resulting hash value of the digest in a base64 encoded form, keeping the digest’s state.

If a string is given, returns the hash value for the given string in a base64 encoded form, resetting the digest to the initial state before and after the process.

In either case, the return value is properly padded with ‘=’ and contains no line feeds.

Returns the resulting hash value and resets the digest to the initial state.

No documentation available

Creates a global method from the given C signature.

The Fiddle::CompositeHandler instance

Will raise an error if no handlers are open.

See IO#getpass.

See IO#readchar.

Reads a one-character string from the stream. Raises an EOFError at end of file.

Closes the SSLSocket and flushes any unwritten data.

Derives a key from pass using given parameters with the scrypt password-based key derivation function. The result can be used for password storage.

scrypt is designed to be memory-hard and more secure against brute-force attacks using custom hardwares than alternative KDFs such as PBKDF2 or bcrypt.

The keyword arguments N, r and p can be used to tune scrypt. RFC 7914 (published on 2016-08, tools.ietf.org/html/rfc7914#section-2) states that using values r=8 and p=1 appears to yield good results.

See RFC 7914 (tools.ietf.org/html/rfc7914) for more information.

Parameters

pass

Passphrase.

salt

Salt.

N

CPU/memory cost parameter. This must be a power of 2.

r

Block size parameter.

p

Parallelization parameter.

length

Length in octets of the derived key.

Example

pass = "password"
salt = SecureRandom.random_bytes(16)
dk = OpenSSL::KDF.scrypt(pass, salt: salt, N: 2**14, r: 8, p: 1, length: 32)
p dk #=> "\xDA\xE4\xE2...\x7F\xA1\x01T"

::seed is equivalent to ::add where entropy is length of str.

Start streaming using encoding

No documentation available

Clears the GC profiler data.

Generate a Document Base URI element as a String.

href can either by a string, giving the base URL for the HREF attribute, or it can be a has of the element’s attributes.

The passed-in no-argument block is ignored.

base("http://www.example.com/cgi")
  # => "<BASE HREF=\"http://www.example.com/cgi\">"

Generate a reset button Input element, as a String.

This resets the values on a form to their initial values. value is the text displayed on the button. name is the name of this button.

Alternatively, the attributes can be specified as a hash.

reset
  # <INPUT TYPE="reset">

reset("reset")
  # <INPUT TYPE="reset" VALUE="reset">

reset("VALUE" => "reset", "ID" => "foo")
  # <INPUT TYPE="reset" VALUE="reset" ID="foo">

Generate a TextArea element, as a String.

name is the name of the textarea. cols is the number of columns and rows is the number of rows in the display.

Alternatively, the attributes can be specified as a hash.

The body is provided by the passed-in no-argument block

textarea("name")
   # = textarea("NAME" => "name", "COLS" => 70, "ROWS" => 10)

textarea("name", 40, 5)
   # = textarea("NAME" => "name", "COLS" => 40, "ROWS" => 5)

Open a client connection to uri with the configuration config.

The DRbProtocol module asks each registered protocol in turn to try to open the URI. Each protocol signals that it does not handle that URI by raising a DRbBadScheme error. If no protocol recognises the URI, then a DRbBadURI error is raised. If a protocol accepts the URI, but an error occurs in opening it, a DRbConnError is raised.

Search took: 8ms  ·  Total Results: 4629