about summary refs log tree commit diff
path: root/src/libextra/extra.rs
AgeCommit message (Collapse)AuthorLines
2013-08-17auto merge of #8272 : DaGenix/rust/digest-md5-impl-not-unrolled, r=cmrbors-0/+2
An MD5 implementation was originally included in #8097, but, since there are a couple different implementations of that digest algorithm (@alco mentioned his implementation on the mailing list just before I opened that PR), it was suggested that I remove it from that PR and open up a new PR to discuss the different implementations and the best way forward. If anyone wants to discuss a different implementation, feel free to present it here and discuss and compare it to this one. I'll just discuss my implementation and I'll leave it to others to present details of theirs. This implementation relies on the FixedBuffer struct from cryptoutil.rs for managing the input buffer, just like the Sha1 and Sha2 digest implementations do. I tried manually unrolling the loops in the compression function, but I got slightly worse performance when I did that. Outside of the #[test]s, I also tested the implementation by generating 1,000 inputs of up to 10MB in size and checking the MD5 digest calculated by this code against the MD5 digest calculated by Java's implementation. On my computer, I'm getting the following performance: ``` test md5::bench::md5_10 ... bench: 52 ns/iter (+/- 1) = 192 MB/s test md5::bench::md5_1k ... bench: 2819 ns/iter (+/- 44) = 363 MB/s test md5::bench::md5_64k ... bench: 178566 ns/iter (+/- 4927) = 367 MB/s ```
2013-08-17MD5: Create an implementation of MD5.Palmer Cox-0/+2
2013-08-16Add UUID support to libextraGavin Baker-0/+2
- generate random UUIDs - convert to and from strings and bytes - parse common string formats - implements Zero, Clone, FromStr, ToStr, Eq, TotalEq and Rand - unit tests and documentation - parsing error codes and strings - incorporate feedback from PR review
2013-08-06Added hexadecimal encoding moduleSteven Fackler-0/+1
FromHex ignores whitespace and parses either upper or lower case hex digits. ToHex outputs lower case hex digits with no whitespace. Unlike ToBase64, ToHex doesn't allow you to configure the output format. I don't feel that it's super useful in this case.
2013-08-06Move EnumSet into libextraSangeun Kim-0/+1
2013-08-02Sha2: Create cryptoutil.rs and re-write the Sha2 module to make use of it.Palmer Cox-0/+2
There are 2 main pieces of functionality in cryptoutil.rs: * A set of unsafe function for efficiently reading and writing u32 and u64 values. All of these functions are fairly easy to audit to confirm that they do what they are supposed to. * A FixedBuffer struct. This struct keeps track of input data until there is enough of it to execute the a function on it which expects a fixed block of data. The Sha2 module was rewritten to take advantage of the new functions in cryptoutil as well as FixedBuffer. The result is that the duplicate code for maintaining a buffer of input data is removed from the Sha512 and Sha256 implementation. Additionally, the FixedBuffer code is much more efficient than the previous code was.
2013-07-31extra: Remove dbg module and rt support codeBrian Anderson-1/+0
This stuff is ancient, unused, and tied to oldsched
2013-07-22extra: Add url moduleBrian Anderson-0/+1
Used to be under extra::net, which no longer exists
2013-07-22extra: Remove uv, net, timer codeBrian Anderson-14/+0
This will all be reimplemented in the new runtime.
2013-07-11extra: Rename deque::Deque to ringbuf::RingBuf and impl trait Dequeblake2-ppc-1/+1
Let RingBuf have a logical name for a concrete type, and Deque is used for the Deque trait (implemented by RingBuf and dlist).
2013-07-11extra: Add mod container with trait Dequeblake2-ppc-0/+1
2013-07-08Bump version numbers to 0.8-preBrian Anderson-1/+1
2013-07-07auto merge of #7629 : thestinger/rust/rope, r=graydonbors-1/+0
It's broken/unmaintained and needs to be rewritten to avoid managed pointers and needless copies. A full rewrite is necessary and the API will need to be redone so it's not worth keeping this around (#7628). Closes #2236, #2744
2013-07-06remove extra::ropeDaniel Micay-1/+0
It's broken/unmaintained and needs to be rewritten to avoid managed pointers and needless copies. A full rewrite is necessary and the API will need to be redone so it's not worth keeping this around. Closes #2236, #2744
2013-07-05Move `extra::net_*` to `extra::net::*` properly.Chris Morgan-3/+1
Where * = tcp, ip, url. Formerly, extra::net::* were aliases of extra::net_*, but were the recommended path to use. Thus, the documentation talked of the `net_*` modules while everything else was written expecting `net::*`. This moves the actual modules so that `extra::net::*` is the actual location of the modules. This will naturally break any code which used `extra::net_*` directly. They should be altered to use `extra::net::*` (which has been the documented way of doing things for some time). This ensures that there is one, and only one, obvious way of doing things.
2013-06-30Bump version from 0.7-pre to 0.7Brian Anderson-1/+1
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-19/+10
2013-06-25Rename all files with the 'rc' extensionAlex Crichton-0/+155