From 64106c4d3d4ddba8c7bc2af75376e6d3d3d75601 Mon Sep 17 00:00:00 2001
From:
Date: Mon, 29 Jun 2015 20:16:15 +0000
Subject: Update documentation
---
openssl/crypto/hash/enum.Type.html | 117 ++++++++++++++++++++++++++
openssl/crypto/hash/fn.hash.html | 102 +++++++++++++++++++++++
openssl/crypto/hash/index.html | 131 +++++++++++++++++++++++++++++
openssl/crypto/hash/sidebar-items.js | 1 +
openssl/crypto/hash/struct.Hasher.html | 148 +++++++++++++++++++++++++++++++++
5 files changed, 499 insertions(+)
create mode 100644 openssl/crypto/hash/enum.Type.html
create mode 100644 openssl/crypto/hash/fn.hash.html
create mode 100644 openssl/crypto/hash/index.html
create mode 100644 openssl/crypto/hash/sidebar-items.js
create mode 100644 openssl/crypto/hash/struct.Hasher.html
(limited to 'openssl/crypto/hash')
diff --git a/openssl/crypto/hash/enum.Type.html b/openssl/crypto/hash/enum.Type.html
new file mode 100644
index 0000000..96a9520
--- /dev/null
+++ b/openssl/crypto/hash/enum.Type.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+pub enum Type {
+ MD5,
+ SHA1,
+ SHA224,
+ SHA256,
+ SHA384,
+ SHA512,
+ RIPEMD160,
+}
Message digest (hash) type.
+
Variants
+MD5 | |
SHA1 | |
SHA224 | |
SHA256 | |
SHA384 | |
SHA512 | |
RIPEMD160 | |
Methods
+
Returns the length of the message digest.
+
+
Internal interface subject to removal.
+
Trait Implementations
Derived Implementations
+
+
+
Keyboard shortcuts
+
+ - ?
+ - Show this help dialog
+ - S
+ - Focus the search field
+ - ⇤
+ - Move up in search results
+ - ⇥
+ - Move down in search results
+ - ⏎
+ - Go to active search result
+
+
+
+
Search tricks
+
+ Prefix searches with a type followed by a colon (e.g.
+ fn:
) to restrict the search to a given type.
+
+
+ Accepted types are: fn
, mod
,
+ struct
, enum
,
+ trait
, typedef
(or
+ tdef
).
+
+
+ Search functions by type signature (e.g.
+ vec -> usize
)
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/openssl/crypto/hash/fn.hash.html b/openssl/crypto/hash/fn.hash.html
new file mode 100644
index 0000000..b1f951b
--- /dev/null
+++ b/openssl/crypto/hash/fn.hash.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+pub fn hash(t: Type, data: &[u8]) -> Vec<u8>
Computes the hash of the data
with the hash t
.
+
+
+
+
Keyboard shortcuts
+
+ - ?
+ - Show this help dialog
+ - S
+ - Focus the search field
+ - ⇤
+ - Move up in search results
+ - ⇥
+ - Move down in search results
+ - ⏎
+ - Go to active search result
+
+
+
+
Search tricks
+
+ Prefix searches with a type followed by a colon (e.g.
+ fn:
) to restrict the search to a given type.
+
+
+ Accepted types are: fn
, mod
,
+ struct
, enum
,
+ trait
, typedef
(or
+ tdef
).
+
+
+ Search functions by type signature (e.g.
+ vec -> usize
)
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/openssl/crypto/hash/index.html b/openssl/crypto/hash/index.html
new file mode 100644
index 0000000..08ea32d
--- /dev/null
+++ b/openssl/crypto/hash/index.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+
Keyboard shortcuts
+
+ - ?
+ - Show this help dialog
+ - S
+ - Focus the search field
+ - ⇤
+ - Move up in search results
+ - ⇥
+ - Move down in search results
+ - ⏎
+ - Go to active search result
+
+
+
+
Search tricks
+
+ Prefix searches with a type followed by a colon (e.g.
+ fn:
) to restrict the search to a given type.
+
+
+ Accepted types are: fn
, mod
,
+ struct
, enum
,
+ trait
, typedef
(or
+ tdef
).
+
+
+ Search functions by type signature (e.g.
+ vec -> usize
)
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/openssl/crypto/hash/sidebar-items.js b/openssl/crypto/hash/sidebar-items.js
new file mode 100644
index 0000000..d747b7b
--- /dev/null
+++ b/openssl/crypto/hash/sidebar-items.js
@@ -0,0 +1 @@
+initSidebarItems({"enum":[["Type","Message digest (hash) type."]],"fn":[["hash","Computes the hash of the `data` with the hash `t`."]],"struct":[["Hasher","Provides message digest (hash) computation."]]});
\ No newline at end of file
diff --git a/openssl/crypto/hash/struct.Hasher.html b/openssl/crypto/hash/struct.Hasher.html
new file mode 100644
index 0000000..63de6bc
--- /dev/null
+++ b/openssl/crypto/hash/struct.Hasher.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+pub struct Hasher {
+ // some fields omitted
+}
Provides message digest (hash) computation.
+
+
+
Calculate a hash in one go.
+
+use openssl::crypto::hash::{hash, Type};
+let data = b"\x42\xF4\x97\xE0";
+let spec = b"\x7c\x43\x0f\x17\x8a\xef\xdf\x14\x87\xfe\xe7\x14\x4e\x96\x41\xe2";
+let res = hash(Type::MD5, data);
+assert_eq!(res, spec);
+
+
+
Use the Write
trait to supply the input in chunks.
+
+use std::io::prelude::*;
+use openssl::crypto::hash::{Hasher, Type};
+let data = [b"\x42\xF4", b"\x97\xE0"];
+let spec = b"\x7c\x43\x0f\x17\x8a\xef\xdf\x14\x87\xfe\xe7\x14\x4e\x96\x41\xe2";
+let mut h = Hasher::new(Type::MD5);
+h.write_all(data[0]);
+h.write_all(data[1]);
+let res = h.finish();
+assert_eq!(res, spec);
+
+
+
+
Don't actually use MD5 and SHA-1 hashes, they're not secure anymore.
+
+
Don't ever hash passwords, use crypto::pkcs5
or bcrypt/scrypt instead.
+
Methods
+
Creates a new Hasher
with the specified hash type.
+
+
Returns the hash of the data written since creation or
+the last finish
and resets the hasher.
+
Trait Implementations
+
+
+
+
fn by_ref(&mut self) -> &mut Self
+
+
+
+
+
Keyboard shortcuts
+
+ - ?
+ - Show this help dialog
+ - S
+ - Focus the search field
+ - ⇤
+ - Move up in search results
+ - ⇥
+ - Move down in search results
+ - ⏎
+ - Go to active search result
+
+
+
+
Search tricks
+
+ Prefix searches with a type followed by a colon (e.g.
+ fn:
) to restrict the search to a given type.
+
+
+ Accepted types are: fn
, mod
,
+ struct
, enum
,
+ trait
, typedef
(or
+ tdef
).
+
+
+ Search functions by type signature (e.g.
+ vec -> usize
)
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3