From b5aa889f7fced8ba2cc1698ae9696d7bd0ca8ab5 Mon Sep 17 00:00:00 2001 From: garhve Date: Tue, 20 Dec 2022 11:07:35 +0800 Subject: remove compiled binary --- .../guessing_game/target/doc/getrandom/all.html | 2 - .../target/doc/getrandom/error/struct.Error.html | 11 -- .../target/doc/getrandom/fn.getrandom.html | 12 --- .../guessing_game/target/doc/getrandom/index.html | 113 --------------------- .../target/doc/getrandom/sidebar-items.js | 1 - .../target/doc/getrandom/struct.Error.html | 47 --------- 6 files changed, 186 deletions(-) delete mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/all.html delete mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/error/struct.Error.html delete mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html delete mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/index.html delete mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/sidebar-items.js delete mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html (limited to 'rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom') diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/all.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/all.html deleted file mode 100644 index ff7a2ce..0000000 --- a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/all.html +++ /dev/null @@ -1,2 +0,0 @@ -List of all items in this crate

List of all items

Structs

Functions

\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/error/struct.Error.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/error/struct.Error.html deleted file mode 100644 index b6a6ce8..0000000 --- a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/error/struct.Error.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../getrandom/struct.Error.html...

- - - \ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html deleted file mode 100644 index 955b469..0000000 --- a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html +++ /dev/null @@ -1,12 +0,0 @@ -getrandom in getrandom - Rust
pub fn getrandom(dest: &mut [u8]) -> Result<(), Error>
Expand description

Fill dest with random bytes from the system’s preferred random number -source.

-

This function returns an error on any failure, including partial reads. We -make no guarantees regarding the contents of dest on error. If dest is -empty, getrandom immediately returns success, making no calls to the -underlying operating system.

-

Blocking is possible, at least during early boot; see module documentation.

-

In general, getrandom will be fast enough for interactive usage, though -significantly slower than a user-space CSPRNG; for the latter consider -rand::thread_rng.

-
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/index.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/index.html deleted file mode 100644 index 2b9842e..0000000 --- a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/index.html +++ /dev/null @@ -1,113 +0,0 @@ -getrandom - Rust
Expand description

Interface to the operating system’s random number generator.

-

Supported targets

- - - - - - - - - - - - - - - - - - - - - -
TargetTarget TripleImplementation
Linux, Android*‑linux‑*getrandom system call if available, otherwise /dev/urandom after successfully polling /dev/random
Windows*‑windows‑*BCryptGenRandom
macOS*‑apple‑darwingetentropy if available, otherwise /dev/random (identical to /dev/urandom)
iOS*‑apple‑iosSecRandomCopyBytes
FreeBSD*‑freebsdgetrandom if available, otherwise kern.arandom
OpenBSD*‑openbsdgetentropy
NetBSD*‑netbsdkern.arandom
Dragonfly BSD*‑dragonflygetrandom if available, otherwise /dev/random
Solaris, illumos*‑solaris, *‑illumosgetrandom if available, otherwise /dev/random
Fuchsia OS*‑fuchsiacprng_draw
Redox*‑redox/dev/urandom
Haiku*‑haiku/dev/random (identical to /dev/urandom)
Hermitx86_64-*-hermitRDRAND
SGXx86_64‑*‑sgxRDRAND
VxWorks*‑wrs‑vxworks‑*randABytes after checking entropy pool initialization with randSecure
ESP-IDF*‑espidfesp_fill_random
Emscripten*‑emscripten/dev/random (identical to /dev/urandom)
WASIwasm32‑wasirandom_get
Web Browser and Node.jswasm32‑*‑unknownCrypto.getRandomValues if available, then crypto.randomFillSync if on Node.js, see WebAssembly support
SOLID*-kmc-solid_*SOLID_RNG_SampleRandomBytes
Nintendo 3DSarmv6k-nintendo-3dsgetrandom
-
-

There is no blanket implementation on unix targets that reads from -/dev/urandom. This ensures all supported targets are using the recommended -interface and respect maximum buffer sizes.

-

Pull Requests that add support for new targets to getrandom are always welcome.

-

Unsupported targets

-

By default, getrandom will not compile on unsupported targets, but certain -features allow a user to select a “fallback” implementation if no supported -implementation exists.

-

All of the below mechanisms only affect unsupported -targets. Supported targets will always use their supported implementations. -This prevents a crate from overriding a secure source of randomness -(either accidentally or intentionally).

-

RDRAND on x86

-

If the rdrand Cargo feature is enabled, getrandom will fallback to using -the RDRAND instruction to get randomness on no_std x86/x86_64 -targets. This feature has no effect on other CPU architectures.

-

WebAssembly support

-

This crate fully supports the -wasm32-wasi and -wasm32-unknown-emscripten -targets. However, the wasm32-unknown-unknown target (i.e. the target used -by wasm-pack) is not automatically -supported since, from the target name alone, we cannot deduce which -JavaScript interface is in use (or if JavaScript is available at all).

-

Instead, if the js Cargo feature is enabled, this crate will assume -that you are building for an environment containing JavaScript, and will -call the appropriate methods. Both web browser (main window and Web Workers) -and Node.js environments are supported, invoking the methods -described above using the wasm-bindgen toolchain.

-

To enable the js Cargo feature, add the following to the dependencies -section in your Cargo.toml file:

-
[dependencies]
-getrandom = { version = "0.2", features = ["js"] }
-
-

This can be done even if getrandom is not a direct dependency. Cargo -allows crates to enable features for indirect dependencies.

-

This feature should only be enabled for binary, test, or benchmark crates. -Library crates should generally not enable this feature, leaving such a -decision to users of their library. Also, libraries should not introduce -their own js features just to enable getrandom’s js feature.

-

This feature has no effect on targets other than wasm32-unknown-unknown.

-
Node.js ES module support
-

Node.js supports both CommonJS modules and ES modules. Due to -limitations in wasm-bindgen’s module support, we cannot directly -support ES Modules running on Node.js. However, on Node v15 and later, the -module author can add a simple shim to support the Web Cryptography API:

-
import { webcrypto } from 'node:crypto'
-globalThis.crypto = webcrypto
-
-

This crate will then use the provided webcrypto implementation.

-

Custom implementations

-

The [register_custom_getrandom!] macro allows a user to mark their own -function as the backing implementation for getrandom. See the macro’s -documentation for more information about writing and registering your own -custom implementations.

-

Note that registering a custom implementation only has an effect on targets -that would otherwise not compile. Any supported targets (including those -using rdrand and js Cargo features) continue using their normal -implementations even if a function is registered.

-

Early boot

-

Sometimes, early in the boot process, the OS has not collected enough -entropy to securely seed its RNG. This is especially common on virtual -machines, where standard “random” events are hard to come by.

-

Some operating system interfaces always block until the RNG is securely -seeded. This can take anywhere from a few seconds to more than a minute. -A few (Linux, NetBSD and Solaris) offer a choice between blocking and -getting an error; in these cases, we always choose to block.

-

On Linux (when the getrandom system call is not available), reading from -/dev/urandom never blocks, even when the OS hasn’t collected enough -entropy yet. To avoid returning low-entropy bytes, we first poll -/dev/random and only switch to /dev/urandom once this has succeeded.

-

On OpenBSD, this kind of entropy accounting isn’t available, and on -NetBSD, blocking on it is discouraged. On these platforms, nonblocking -interfaces are used, even when reliable entropy may not be available. -On the platforms where it is used, the reliability of entropy accounting -itself isn’t free from controversy. This library provides randomness -sourced according to the platform’s best practices, but each platform has -its own limits on the grade of randomness it can promise in environments -with few sources of entropy.

-

Error handling

-

We always choose failure over returning known insecure “random” bytes. In -general, on supported platforms, failure is highly unlikely, though not -impossible. If an error does occur, then it is likely that it will occur -on every call to getrandom, hence after the first successful call one -can be reasonably confident that no errors will occur.

-

Structs

A small and no_std compatible error type

Functions

Fill dest with random bytes from the system’s preferred random number -source.
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/sidebar-items.js b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/sidebar-items.js deleted file mode 100644 index 5d4d934..0000000 --- a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":[["getrandom","Fill `dest` with random bytes from the system’s preferred random number source."]],"struct":[["Error","A small and `no_std` compatible error type"]]}; \ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html deleted file mode 100644 index d0f8c77..0000000 --- a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html +++ /dev/null @@ -1,47 +0,0 @@ -Error in getrandom - Rust
pub struct Error(_);
Expand description

A small and no_std compatible error type

-

The Error::raw_os_error() will indicate if the error is from the OS, and -if so, which error code the OS gave the application. If such an error is -encountered, please consult with your system documentation.

-

Internally this type is a NonZeroU32, with certain values reserved for -certain purposes, see Error::INTERNAL_START and Error::CUSTOM_START.

-

If this crate’s "std" Cargo feature is enabled, then:

- -

Implementations

This target/platform is not supported by getrandom.

-

The platform-specific errno returned a non-positive value.

-

Call to iOS SecRandomCopyBytes failed.

-

Call to Windows RtlGenRandom failed.

-

RDRAND instruction failed due to a hardware issue.

-

RDRAND instruction unsupported on this target.

-

The environment does not support the Web Crypto API.

-

Calling Web Crypto API crypto.getRandomValues failed.

-

On VxWorks, call to randSecure failed (random number generator is not yet initialized).

-

Node.js does not have the crypto CommonJS module.

-

Calling Node.js function crypto.randomFillSync failed.

-

Called from an ES module on Node.js. This is unsupported, see: -https://docs.rs/getrandom#nodejs-es-module-support.

-

Codes below this point represent OS Errors (i.e. positive i32 values). -Codes at or above this point, but below Error::CUSTOM_START are -reserved for use by the rand and getrandom crates.

-

Codes at or above this point can be used by users to define their own -custom errors.

-

Extract the raw OS error code (if this error came from the OS)

-

This method is identical to std::io::Error::raw_os_error(), except -that it works in no_std contexts. If this method returns None, the -error value can still be formatted via the Display implementation.

-

Extract the bare error code.

-

This code can either come from the underlying OS, or be a custom error. -Use Error::raw_os_error() to disambiguate.

-

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used -by ==. Read more
This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

-

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file -- cgit v1.2.3-70-g09d2