This commit is contained in:
debris
2015-12-30 12:46:10 +01:00
parent 2e7f0e29de
commit 156fcad4e2
5 changed files with 32 additions and 12 deletions

View File

@@ -311,9 +311,6 @@ pub mod ffi {
#[no_mangle]
pub unsafe extern "C" fn env_sha3(begin: *const u8, size: u64, out_hash: *mut JitI256) {
// TODO: write tests
// it may be incorrect due to endianess
// if it is, don't use `from_raw_parts`
let out_hash = &mut *out_hash;
let input = slice::from_raw_parts(begin, size as usize);
let outlen = out_hash.words.len() * 8;