6 Commits

Author SHA1 Message Date
Brian Smith
7749647a18 Stop dev-dependency on rustc_serialize for tests.
`cargo test -p ring` will build and run the tests, but apparently without
installing *ring*'s dev-dependencies. Thus, we need to eliminate the
dev-dependencies to make that work.
2016-05-27 01:13:50 -10:00
Brian Smith
e659a35d98 Remove examples/fastpbkdf2_bench.rs.
A modified version of this benchmark was moved to
https://github.com/briansmith/crypto-bench.
2015-10-28 16:04:44 -10:00
Brian Smith
2e887d11cb Add examples/fastpkbdf2_bench.
This allows for performance comparisons between *ring* and other
implementations. I think the benchmark is too noisy. Unfortunately,
|cargo bench| doesn't work well for measuring this because
|cargo bench| insists on doing a huge number of iterations, which means
that each run takes too long in a edit-compile-measure cycle.
2015-10-12 10:31:56 -10:00
Brian Smith
32480fc591 Refactor |ring::digest| to have a more usable API.
The previous interface suffered from multiple problems that made it
annoying to use in contexts that needed to digest data with a digest
function that wasn't known statically at build time. The old interface
was also hard to avoid uses of the heap when digest algorithm agility
is required. It was also annoying that one had to import the |Digest|
trait even in code that only wanted to use a statically-chosen digest
function, because calling a method declared in a trait requires that.

The updates to examples/checkdigest.rs demonstrate the improved
usability.

This change also moves to a new style where it is assumed that users of
*ring* will |use ring::*| and then access submodules using
partially-qualified syntax. For example, instead of naming the digest
context type |DigestContext|, it is named just |Context| with the
expectation that code will refer to it as |digest::Context|. Future
sub-modules will follow this convention so that, for example, the HMAC
context type will be |ring::hmac::Context|.

The new interface also helps establish the convention that algorithms
exposed as |pub static| values of some type, usually a struct type.
This convention help enable the linker to discard the code for unused
algorithms.

The fact that |SignatureDigestAlgorithm| is no longer needed in this
new design is a good indication that we're on a better track.
2015-09-15 16:58:53 -07:00
Brian Smith
0b23f8cf9e Rename the C library to "ring-core", rename Rust crate to "ring".
The Rust crate can't be named "ring" if it links to a C library called
"ring".
2015-08-26 21:18:41 -07:00
Brian Smith
20b97a69a9 Rust: Add API for calculating digests (SHA-256, etc.). 2015-08-26 21:18:37 -07:00