diff options
| author | Palmer Cox <p@lmercox.com> | 2013-07-27 14:02:18 -0400 |
|---|---|---|
| committer | Palmer Cox <p@lmercox.com> | 2013-08-02 18:48:14 -0400 |
| commit | 654c536fec01d984f758ec32904354378aa3b792 (patch) | |
| tree | 14cceb6fa6590ba897d5aaa7759d7fd460560181 /src/rt/rust_exchange_alloc.cpp | |
| parent | 3cac62822edf3715afdaa2770333f00f38a51545 (diff) | |
| download | rust-654c536fec01d984f758ec32904354378aa3b792.tar.gz rust-654c536fec01d984f758ec32904354378aa3b792.zip | |
Sha2: Create cryptoutil.rs and re-write the Sha2 module to make use of it.
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.
Diffstat (limited to 'src/rt/rust_exchange_alloc.cpp')
0 files changed, 0 insertions, 0 deletions
