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 ++++++++++++++++++++++ openssl/crypto/hmac/fn.hmac.html | 102 +++++++++++++++ openssl/crypto/hmac/index.html | 121 ++++++++++++++++++ openssl/crypto/hmac/sidebar-items.js | 1 + openssl/crypto/hmac/struct.HMAC.html | 146 ++++++++++++++++++++++ openssl/crypto/index.html | 158 ++++++++++++++++++++++++ openssl/crypto/memcmp/fn.eq.html | 110 +++++++++++++++++ openssl/crypto/memcmp/index.html | 111 +++++++++++++++++ openssl/crypto/memcmp/sidebar-items.js | 1 + openssl/crypto/pkcs5/fn.pbkdf2_hmac_sha1.html | 102 +++++++++++++++ openssl/crypto/pkcs5/index.html | 111 +++++++++++++++++ openssl/crypto/pkcs5/sidebar-items.js | 1 + openssl/crypto/pkey/enum.EncryptionPadding.html | 108 ++++++++++++++++ openssl/crypto/pkey/enum.Parts.html | 108 ++++++++++++++++ openssl/crypto/pkey/enum.Role.html | 110 +++++++++++++++++ openssl/crypto/pkey/index.html | 137 ++++++++++++++++++++ openssl/crypto/pkey/sidebar-items.js | 1 + openssl/crypto/pkey/struct.PKey.html | 153 +++++++++++++++++++++++ openssl/crypto/rand/fn.rand_bytes.html | 101 +++++++++++++++ openssl/crypto/rand/index.html | 110 +++++++++++++++++ openssl/crypto/rand/sidebar-items.js | 1 + openssl/crypto/sidebar-items.js | 1 + openssl/crypto/symm/enum.Mode.html | 107 ++++++++++++++++ openssl/crypto/symm/enum.Type.html | 110 +++++++++++++++++ openssl/crypto/symm/fn.decrypt.html | 103 +++++++++++++++ openssl/crypto/symm/fn.encrypt.html | 103 +++++++++++++++ openssl/crypto/symm/index.html | 149 ++++++++++++++++++++++ openssl/crypto/symm/sidebar-items.js | 1 + openssl/crypto/symm/struct.Crypter.html | 116 +++++++++++++++++ 33 files changed, 2982 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 create mode 100644 openssl/crypto/hmac/fn.hmac.html create mode 100644 openssl/crypto/hmac/index.html create mode 100644 openssl/crypto/hmac/sidebar-items.js create mode 100644 openssl/crypto/hmac/struct.HMAC.html create mode 100644 openssl/crypto/index.html create mode 100644 openssl/crypto/memcmp/fn.eq.html create mode 100644 openssl/crypto/memcmp/index.html create mode 100644 openssl/crypto/memcmp/sidebar-items.js create mode 100644 openssl/crypto/pkcs5/fn.pbkdf2_hmac_sha1.html create mode 100644 openssl/crypto/pkcs5/index.html create mode 100644 openssl/crypto/pkcs5/sidebar-items.js create mode 100644 openssl/crypto/pkey/enum.EncryptionPadding.html create mode 100644 openssl/crypto/pkey/enum.Parts.html create mode 100644 openssl/crypto/pkey/enum.Role.html create mode 100644 openssl/crypto/pkey/index.html create mode 100644 openssl/crypto/pkey/sidebar-items.js create mode 100644 openssl/crypto/pkey/struct.PKey.html create mode 100644 openssl/crypto/rand/fn.rand_bytes.html create mode 100644 openssl/crypto/rand/index.html create mode 100644 openssl/crypto/rand/sidebar-items.js create mode 100644 openssl/crypto/sidebar-items.js create mode 100644 openssl/crypto/symm/enum.Mode.html create mode 100644 openssl/crypto/symm/enum.Type.html create mode 100644 openssl/crypto/symm/fn.decrypt.html create mode 100644 openssl/crypto/symm/fn.encrypt.html create mode 100644 openssl/crypto/symm/index.html create mode 100644 openssl/crypto/symm/sidebar-items.js create mode 100644 openssl/crypto/symm/struct.Crypter.html (limited to 'openssl/crypto') 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 @@ + + + + + + + + + + openssl::crypto::hash::Type - Rust + + + + + + + + + + + + + + + +
+

Enum openssl::crypto::hash::Type + + [] + + [src]

+
pub enum Type {
+    MD5,
+    SHA1,
+    SHA224,
+    SHA256,
+    SHA384,
+    SHA512,
+    RIPEMD160,
+}

Message digest (hash) type.

+

Variants

+
MD5
SHA1
SHA224
SHA256
SHA384
SHA512
RIPEMD160

Methods

impl Type

fn md_len(&self) -> usize

+

Returns the length of the message digest.

+

fn evp_md(&self) -> *const EVP_MD

+

Internal interface subject to removal.

+

Trait Implementations

Derived Implementations

impl Clone for Type

fn clone(&self) -> Type

+

fn clone_from(&mut self, source: &Self)

+

impl Copy for Type

+ + + + + + + + + + + + + + + \ 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 @@ + + + + + + + + + + openssl::crypto::hash::hash - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::hash::hash + + [] + + [src]

+
pub fn hash(t: Type, data: &[u8]) -> Vec<u8>

Computes the hash of the data with the hash t.

+
+ + + + + + + + + + + + + + + \ 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 @@ + + + + + + + + + + openssl::crypto::hash - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::hash + + [] + + [src]

+

Structs

+ + + + + +
Hasher +

Provides message digest (hash) computation.

+ +

Enums

+ + + + + +
Type +

Message digest (hash) type.

+ +

Functions

+ + + + + +
hash +

Computes the hash of the data with the hash t.

+ +
+ + + + + + + + + + + + + + + \ 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 @@ + + + + + + + + + + openssl::crypto::hash::Hasher - Rust + + + + + + + + + + + + + + + +
+

Struct openssl::crypto::hash::Hasher + + [] + + [src]

+
pub struct Hasher {
+    // some fields omitted
+}

Provides message digest (hash) computation.

+ +

Examples

+

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);
+
+ +

Warning

+

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

impl Hasher

fn new(ty: Type) -> Hasher

+

Creates a new Hasher with the specified hash type.

+

fn finish(&mut self) -> Vec<u8>

+

Returns the hash of the data written since creation or +the last finish and resets the hasher.

+

Trait Implementations

impl Write for Hasher

fn write(&mut self, buf: &[u8]) -> Result<usize>

+

fn flush(&mut self) -> Result<()>

+

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

+

fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

+

fn by_ref(&mut self) -> &mut Self

+

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write

+

impl Clone for Hasher

fn clone(&self) -> Hasher

+

fn clone_from(&mut self, source: &Self)

+

impl Drop for Hasher

fn drop(&mut self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/hmac/fn.hmac.html b/openssl/crypto/hmac/fn.hmac.html new file mode 100644 index 0000000..a9af0d5 --- /dev/null +++ b/openssl/crypto/hmac/fn.hmac.html @@ -0,0 +1,102 @@ + + + + + + + + + + openssl::crypto::hmac::hmac - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::hmac::hmac + + [] + + [src]

+
pub fn hmac(t: Type, key: &[u8], data: &[u8]) -> Vec<u8>

Computes the HMAC of the data with the hash t and key.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/hmac/index.html b/openssl/crypto/hmac/index.html new file mode 100644 index 0000000..b00fe49 --- /dev/null +++ b/openssl/crypto/hmac/index.html @@ -0,0 +1,121 @@ + + + + + + + + + + openssl::crypto::hmac - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::hmac + + [] + + [src]

+

Structs

+ + + + + +
HMAC +

Provides HMAC computation.

+ +

Functions

+ + + + + +
hmac +

Computes the HMAC of the data with the hash t and key.

+ +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/hmac/sidebar-items.js b/openssl/crypto/hmac/sidebar-items.js new file mode 100644 index 0000000..eeb5a4b --- /dev/null +++ b/openssl/crypto/hmac/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["hmac","Computes the HMAC of the `data` with the hash `t` and `key`."]],"struct":[["HMAC","Provides HMAC computation."]]}); \ No newline at end of file diff --git a/openssl/crypto/hmac/struct.HMAC.html b/openssl/crypto/hmac/struct.HMAC.html new file mode 100644 index 0000000..4f062e2 --- /dev/null +++ b/openssl/crypto/hmac/struct.HMAC.html @@ -0,0 +1,146 @@ + + + + + + + + + + openssl::crypto::hmac::HMAC - Rust + + + + + + + + + + + + + + + +
+

Struct openssl::crypto::hmac::HMAC + + [] + + [src]

+
pub struct HMAC {
+    // some fields omitted
+}

Provides HMAC computation.

+ +

Examples

+

Calculate a HMAC in one go.

+
+use openssl::crypto::hash::Type;
+use openssl::crypto::hmac::hmac;
+let key = b"Jefe";
+let data = b"what do ya want for nothing?";
+let spec = b"\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38";
+let res = hmac(Type::MD5, key, data);
+assert_eq!(res, spec);
+
+ +

Use the Write trait to supply the input in chunks.

+
+use std::io::prelude::*;
+use openssl::crypto::hash::Type;
+use openssl::crypto::hmac::HMAC;
+let key = b"Jefe";
+let data: &[&[u8]] = &[b"what do ya ", b"want for nothing?"];
+let spec = b"\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38";
+let mut h = HMAC::new(Type::MD5, &*key);
+h.write_all(data[0]);
+h.write_all(data[1]);
+let res = h.finish();
+assert_eq!(res, spec);
+
+

Methods

impl HMAC

fn new(ty: Type, key: &[u8]) -> HMAC

+

Creates a new HMAC with the specified hash type using the key.

+

fn finish(&mut self) -> Vec<u8>

+

Returns the hash of the data written since creation or +the last finish and resets the hasher.

+

Trait Implementations

impl Write for HMAC

fn write(&mut self, buf: &[u8]) -> Result<usize>

+

fn flush(&mut self) -> Result<()>

+

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

+

fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

+

fn by_ref(&mut self) -> &mut Self

+

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write

+

impl Clone for HMAC

fn clone(&self) -> HMAC

+

fn clone_from(&mut self, source: &Self)

+

impl Drop for HMAC

fn drop(&mut self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/index.html b/openssl/crypto/index.html new file mode 100644 index 0000000..ba9e434 --- /dev/null +++ b/openssl/crypto/index.html @@ -0,0 +1,158 @@ + + + + + + + + + + openssl::crypto - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto + + [] + + [src]

+

Modules

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
hash + +
hmac + +
memcmp + +
pkcs5 + +
pkey + +
rand + +
symm + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/memcmp/fn.eq.html b/openssl/crypto/memcmp/fn.eq.html new file mode 100644 index 0000000..5cea19f --- /dev/null +++ b/openssl/crypto/memcmp/fn.eq.html @@ -0,0 +1,110 @@ + + + + + + + + + + openssl::crypto::memcmp::eq - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::memcmp::eq + + [] + + [src]

+
pub fn eq(a: &[u8], b: &[u8]) -> bool

Returns true iff a and b contain the same bytes.

+ +

This operation takes an amount of time dependent on the length of the two +arrays given, but is independent of the contents of a and b.

+ +

Failure

+

This function will panic the current task if a and b do not have the same +length.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/memcmp/index.html b/openssl/crypto/memcmp/index.html new file mode 100644 index 0000000..928df1a --- /dev/null +++ b/openssl/crypto/memcmp/index.html @@ -0,0 +1,111 @@ + + + + + + + + + + openssl::crypto::memcmp - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::memcmp + + [] + + [src]

+

Functions

+ + + + + +
eq +

Returns true iff a and b contain the same bytes.

+ +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/memcmp/sidebar-items.js b/openssl/crypto/memcmp/sidebar-items.js new file mode 100644 index 0000000..f393da7 --- /dev/null +++ b/openssl/crypto/memcmp/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["eq","Returns `true` iff `a` and `b` contain the same bytes."]]}); \ No newline at end of file diff --git a/openssl/crypto/pkcs5/fn.pbkdf2_hmac_sha1.html b/openssl/crypto/pkcs5/fn.pbkdf2_hmac_sha1.html new file mode 100644 index 0000000..2977476 --- /dev/null +++ b/openssl/crypto/pkcs5/fn.pbkdf2_hmac_sha1.html @@ -0,0 +1,102 @@ + + + + + + + + + + openssl::crypto::pkcs5::pbkdf2_hmac_sha1 - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::pkcs5::pbkdf2_hmac_sha1 + + [] + + [src]

+
pub fn pbkdf2_hmac_sha1(pass: &str, salt: &[u8], iter: usize, keylen: usize) -> Vec<u8>

Derives a key from a password and salt using the PBKDF2-HMAC-SHA1 algorithm.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/pkcs5/index.html b/openssl/crypto/pkcs5/index.html new file mode 100644 index 0000000..f67af6f --- /dev/null +++ b/openssl/crypto/pkcs5/index.html @@ -0,0 +1,111 @@ + + + + + + + + + + openssl::crypto::pkcs5 - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::pkcs5 + + [] + + [src]

+

Functions

+ + + + + +
pbkdf2_hmac_sha1 +

Derives a key from a password and salt using the PBKDF2-HMAC-SHA1 algorithm.

+ +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/pkcs5/sidebar-items.js b/openssl/crypto/pkcs5/sidebar-items.js new file mode 100644 index 0000000..d5c3b45 --- /dev/null +++ b/openssl/crypto/pkcs5/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["pbkdf2_hmac_sha1","Derives a key from a password and salt using the PBKDF2-HMAC-SHA1 algorithm."]]}); \ No newline at end of file diff --git a/openssl/crypto/pkey/enum.EncryptionPadding.html b/openssl/crypto/pkey/enum.EncryptionPadding.html new file mode 100644 index 0000000..f9871ce --- /dev/null +++ b/openssl/crypto/pkey/enum.EncryptionPadding.html @@ -0,0 +1,108 @@ + + + + + + + + + + openssl::crypto::pkey::EncryptionPadding - Rust + + + + + + + + + + + + + + + +
+

Enum openssl::crypto::pkey::EncryptionPadding + + [] + + [src]

+
pub enum EncryptionPadding {
+    OAEP,
+    PKCS1v15,
+}

Type of encryption padding to use.

+

Variants

+
OAEP
PKCS1v15

Trait Implementations

Derived Implementations

impl Clone for EncryptionPadding

fn clone(&self) -> EncryptionPadding

+

fn clone_from(&mut self, source: &Self)

+

impl Copy for EncryptionPadding

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/pkey/enum.Parts.html b/openssl/crypto/pkey/enum.Parts.html new file mode 100644 index 0000000..a35fdfa --- /dev/null +++ b/openssl/crypto/pkey/enum.Parts.html @@ -0,0 +1,108 @@ + + + + + + + + + + openssl::crypto::pkey::Parts - Rust + + + + + + + + + + + + + + + +
+

Enum openssl::crypto::pkey::Parts + + [] + + [src]

+
pub enum Parts {
+    Neither,
+    Public,
+    Both,
+}

Variants

+
Neither
Public
Both

Trait Implementations

Derived Implementations

impl Clone for Parts

fn clone(&self) -> Parts

+

fn clone_from(&mut self, source: &Self)

+

impl Copy for Parts

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/pkey/enum.Role.html b/openssl/crypto/pkey/enum.Role.html new file mode 100644 index 0000000..953ef47 --- /dev/null +++ b/openssl/crypto/pkey/enum.Role.html @@ -0,0 +1,110 @@ + + + + + + + + + + openssl::crypto::pkey::Role - Rust + + + + + + + + + + + + + + + +
+

Enum openssl::crypto::pkey::Role + + [] + + [src]

+
pub enum Role {
+    Encrypt,
+    Decrypt,
+    Sign,
+    Verify,
+}

Represents a role an asymmetric key might be appropriate for.

+

Variants

+
Encrypt
Decrypt
Sign
Verify

Trait Implementations

Derived Implementations

impl Clone for Role

fn clone(&self) -> Role

+

fn clone_from(&mut self, source: &Self)

+

impl Copy for Role

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/pkey/index.html b/openssl/crypto/pkey/index.html new file mode 100644 index 0000000..f3a9320 --- /dev/null +++ b/openssl/crypto/pkey/index.html @@ -0,0 +1,137 @@ + + + + + + + + + + openssl::crypto::pkey - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::pkey + + [] + + [src]

+

Structs

+ + + + + +
PKey + +

Enums

+ + + + + + + + + + + + + + + +
EncryptionPadding +

Type of encryption padding to use.

+ +
Parts + +
Role +

Represents a role an asymmetric key might be appropriate for.

+ +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/pkey/sidebar-items.js b/openssl/crypto/pkey/sidebar-items.js new file mode 100644 index 0000000..8bab8a4 --- /dev/null +++ b/openssl/crypto/pkey/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["EncryptionPadding","Type of encryption padding to use."],["Parts",""],["Role","Represents a role an asymmetric key might be appropriate for."]],"struct":[["PKey",""]]}); \ No newline at end of file diff --git a/openssl/crypto/pkey/struct.PKey.html b/openssl/crypto/pkey/struct.PKey.html new file mode 100644 index 0000000..88638be --- /dev/null +++ b/openssl/crypto/pkey/struct.PKey.html @@ -0,0 +1,153 @@ + + + + + + + + + + openssl::crypto::pkey::PKey - Rust + + + + + + + + + + + + + + + +
+

Struct openssl::crypto::pkey::PKey + + [] + + [src]

+
pub struct PKey {
+    // some fields omitted
+}

Methods

impl PKey

Represents a public key, optionally with a private key attached.

+

fn new() -> PKey

+

fn from_handle(handle: *mut EVP_PKEY, parts: Parts) -> PKey

+

fn private_key_from_pem<R>(reader: &mut R) -> Result<PKey, SslError> where R: Read

+

Reads private key from PEM, takes ownership of handle

+

fn gen(&mut self, keysz: usize)

+

fn save_pub(&self) -> Vec<u8>

+

Returns a serialized form of the public key, suitable for load_pub().

+

fn load_pub(&mut self, s: &[u8])

+

Loads a serialized form of the public key, as produced by save_pub().

+

fn save_priv(&self) -> Vec<u8>

+

Returns a serialized form of the public and private keys, suitable for +load_priv().

+

fn load_priv(&mut self, s: &[u8])

+

Loads a serialized form of the public and private keys, as produced by +save_priv().

+

fn write_pem<W: Write>(&self, writer: &mut W) -> Result<(), SslError>

+

Stores private key as a PEM

+

fn size(&self) -> usize

+

Returns the size of the public key modulus.

+

fn can(&self, r: Role) -> bool

+

Returns whether this pkey object can perform the specified role.

+

fn max_data(&self) -> usize

+

Returns the maximum amount of data that can be encrypted by an encrypt() +call.

+

fn encrypt_with_padding(&self, s: &[u8], padding: EncryptionPadding) -> Vec<u8>

+

fn decrypt_with_padding(&self, s: &[u8], padding: EncryptionPadding) -> Vec<u8>

+

fn encrypt(&self, s: &[u8]) -> Vec<u8>

+

Encrypts data using OAEP padding, returning the encrypted data. The +supplied data must not be larger than max_data().

+

fn decrypt(&self, s: &[u8]) -> Vec<u8>

+

Decrypts data, expecting OAEP padding, returning the decrypted data.

+

fn sign(&self, s: &[u8]) -> Vec<u8>

+

Signs data, using OpenSSL's default scheme and adding sha256 ASN.1 information to the +signature. +The bytes to sign must be the result of a sha256 hashing; +returns the signature.

+

fn verify(&self, h: &[u8], s: &[u8]) -> bool

+

Verifies a signature s (using OpenSSL's default scheme and sha256) on the SHA256 hash of a +message. +Returns true if the signature is valid, and false otherwise.

+

fn sign_with_hash(&self, s: &[u8], hash: Type) -> Vec<u8>

+

Signs data, using OpenSSL's default scheme and add ASN.1 information for the given hash type to the +signature. +The bytes to sign must be the result of this type of hashing; +returns the signature.

+

fn verify_with_hash(&self, h: &[u8], s: &[u8], hash: Type) -> bool

+

unsafe fn get_handle(&self) -> *mut EVP_PKEY

+

fn public_eq(&self, other: &PKey) -> bool

+

Trait Implementations

impl Drop for PKey

fn drop(&mut self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/rand/fn.rand_bytes.html b/openssl/crypto/rand/fn.rand_bytes.html new file mode 100644 index 0000000..5737d04 --- /dev/null +++ b/openssl/crypto/rand/fn.rand_bytes.html @@ -0,0 +1,101 @@ + + + + + + + + + + openssl::crypto::rand::rand_bytes - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::rand::rand_bytes + + [] + + [src]

+
pub fn rand_bytes(len: usize) -> Vec<u8>
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/rand/index.html b/openssl/crypto/rand/index.html new file mode 100644 index 0000000..781df1d --- /dev/null +++ b/openssl/crypto/rand/index.html @@ -0,0 +1,110 @@ + + + + + + + + + + openssl::crypto::rand - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::rand + + [] + + [src]

+

Functions

+ + + + + +
rand_bytes + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/rand/sidebar-items.js b/openssl/crypto/rand/sidebar-items.js new file mode 100644 index 0000000..cb4fd37 --- /dev/null +++ b/openssl/crypto/rand/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["rand_bytes",""]]}); \ No newline at end of file diff --git a/openssl/crypto/sidebar-items.js b/openssl/crypto/sidebar-items.js new file mode 100644 index 0000000..a489f37 --- /dev/null +++ b/openssl/crypto/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["hash",""],["hmac",""],["memcmp",""],["pkcs5",""],["pkey",""],["rand",""],["symm",""]]}); \ No newline at end of file diff --git a/openssl/crypto/symm/enum.Mode.html b/openssl/crypto/symm/enum.Mode.html new file mode 100644 index 0000000..6358109 --- /dev/null +++ b/openssl/crypto/symm/enum.Mode.html @@ -0,0 +1,107 @@ + + + + + + + + + + openssl::crypto::symm::Mode - Rust + + + + + + + + + + + + + + + +
+

Enum openssl::crypto::symm::Mode + + [] + + [src]

+
pub enum Mode {
+    Encrypt,
+    Decrypt,
+}

Variants

+
Encrypt
Decrypt

Trait Implementations

Derived Implementations

impl Clone for Mode

fn clone(&self) -> Mode

+

fn clone_from(&mut self, source: &Self)

+

impl Copy for Mode

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/symm/enum.Type.html b/openssl/crypto/symm/enum.Type.html new file mode 100644 index 0000000..5ebf03c --- /dev/null +++ b/openssl/crypto/symm/enum.Type.html @@ -0,0 +1,110 @@ + + + + + + + + + + openssl::crypto::symm::Type - Rust + + + + + + + + + + + + + + + +
+

Enum openssl::crypto::symm::Type + + [] + + [src]

+
pub enum Type {
+    AES_128_ECB,
+    AES_128_CBC,
+    AES_256_ECB,
+    AES_256_CBC,
+    RC4_128,
+}

Variants

+
AES_128_ECB
AES_128_CBC
AES_256_ECB
AES_256_CBC
RC4_128

Trait Implementations

Derived Implementations

impl Clone for Type

fn clone(&self) -> Type

+

fn clone_from(&mut self, source: &Self)

+

impl Copy for Type

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/symm/fn.decrypt.html b/openssl/crypto/symm/fn.decrypt.html new file mode 100644 index 0000000..2a4f6d9 --- /dev/null +++ b/openssl/crypto/symm/fn.decrypt.html @@ -0,0 +1,103 @@ + + + + + + + + + + openssl::crypto::symm::decrypt - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::symm::decrypt + + [] + + [src]

+
pub fn decrypt<T: AsRef<[u8]>>(t: Type, key: &[u8], iv: T, data: &[u8]) -> Vec<u8>

Decrypts data, using the specified crypter type in decrypt mode with the +specified key and iv; returns the resulting (decrypted) data.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/symm/fn.encrypt.html b/openssl/crypto/symm/fn.encrypt.html new file mode 100644 index 0000000..ce19357 --- /dev/null +++ b/openssl/crypto/symm/fn.encrypt.html @@ -0,0 +1,103 @@ + + + + + + + + + + openssl::crypto::symm::encrypt - Rust + + + + + + + + + + + + + + + +
+

Function openssl::crypto::symm::encrypt + + [] + + [src]

+
pub fn encrypt<T: AsRef<[u8]>>(t: Type, key: &[u8], iv: T, data: &[u8]) -> Vec<u8>

Encrypts data, using the specified crypter type in encrypt mode with the +specified key and iv; returns the resulting (encrypted) data.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/symm/index.html b/openssl/crypto/symm/index.html new file mode 100644 index 0000000..9980d1c --- /dev/null +++ b/openssl/crypto/symm/index.html @@ -0,0 +1,149 @@ + + + + + + + + + + openssl::crypto::symm - Rust + + + + + + + + + + + + + + + +
+

Module openssl::crypto::symm + + [] + + [src]

+

Structs

+ + + + + +
Crypter +

Represents a symmetric cipher context.

+ +

Enums

+ + + + + + + + + + +
Mode + +
Type + +

Functions

+ + + + + + + + + + +
decrypt +

Decrypts data, using the specified crypter type in decrypt mode with the +specified key and iv; returns the resulting (decrypted) data.

+ +
encrypt +

Encrypts data, using the specified crypter type in encrypt mode with the +specified key and iv; returns the resulting (encrypted) data.

+ +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openssl/crypto/symm/sidebar-items.js b/openssl/crypto/symm/sidebar-items.js new file mode 100644 index 0000000..4f24c16 --- /dev/null +++ b/openssl/crypto/symm/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Mode",""],["Type",""]],"fn":[["decrypt","Decrypts data, using the specified crypter type in decrypt mode with the specified key and iv; returns the resulting (decrypted) data."],["encrypt","Encrypts data, using the specified crypter type in encrypt mode with the specified key and iv; returns the resulting (encrypted) data."]],"struct":[["Crypter","Represents a symmetric cipher context."]]}); \ No newline at end of file diff --git a/openssl/crypto/symm/struct.Crypter.html b/openssl/crypto/symm/struct.Crypter.html new file mode 100644 index 0000000..de2b90b --- /dev/null +++ b/openssl/crypto/symm/struct.Crypter.html @@ -0,0 +1,116 @@ + + + + + + + + + + openssl::crypto::symm::Crypter - Rust + + + + + + + + + + + + + + + +
+

Struct openssl::crypto::symm::Crypter + + [] + + [src]

+
pub struct Crypter {
+    // some fields omitted
+}

Represents a symmetric cipher context.

+

Methods

impl Crypter

fn new(t: Type) -> Crypter

+

fn pad(&self, padding: bool)

+

Enables or disables padding. If padding is disabled, total amount of +data encrypted must be a multiple of block size.

+

fn init<T: AsRef<[u8]>>(&self, mode: Mode, key: &[u8], iv: T)

+

Initializes this crypter.

+

fn update(&self, data: &[u8]) -> Vec<u8>

+

Update this crypter with more data to encrypt or decrypt. Returns +encrypted or decrypted bytes.

+

fn finalize(&self) -> Vec<u8>

+

Finish crypting. Returns the remaining partial block of output, if any.

+

Trait Implementations

impl Drop for Crypter

fn drop(&mut self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3