Basic self_encryptor example DIY instructions

I might be able to help. I ended up using the latest MinGW version of the libsodium which is here:

https://download.libsodium.org/libsodium/releases/libsodium-1.0.3-mingw.tar.gz

This file contains both 32-bit and 64-bit binaries. I used the 32-bit library, but in this same file’s libsodium-win64/lib subfolder, it has the libsodium.a there. So copying that over to ./bin/x86_64-pc-windows-gnu should allow you to link it. Let me know if that doesn’t work.

1 Like

Thanks a ton @eggmunkee :joy:
I realized with your message that 7zip was not displaying correctly the content of the archive… with winrar I found the file. Going to chunk my hard drive away to celebrate!

Hello i play with the self_encryptor on 64-bit machine and everything is fine but on
xubuntu 15.04 32-bit machine, i am less lucky :cry:
I put CFLAGS=“-mmmx -msse” in my .bashrc but that did not help.

Here’s what i get:

/home/scv/.cargo/registry/src/github.com-121aea75f9ef2ce2/sodiumoxide-0.0.6/src/crypto/verify.rs:63:52: 63:66 error: mismatched types:
expected u32,
found u64
(expected u32,
found u64) [E0308]
/home/scv/.cargo/registry/src/github.com-121aea75f9ef2ce2/sodiumoxide-0.0.6/src/crypto/verify.rs:63 ffi::sodium_memcmp(x.as_ptr(), y.as_ptr(), x.len() as u64) == 0
^~~~~~~~~~~~~~
/home/scv/.cargo/registry/src/github.com-121aea75f9ef2ce2/sodiumoxide-0.0.6/src/crypto/verify.rs:63:52: 63:66 help: run rustc --explain E0308 to see a detailed explanation
error: aborting due to previous error
Compiling memory_map v0.0.2
Compiling flate2 v0.2.7
Compiling docopt v0.6.70
Build failed, waiting for other jobs to finish…
Could not compile sodiumoxide.

To learn more, run the command again with --verbose.

Your help is welcome :wink:
Thanks

3 Likes

This is a bug in the sodiumoxide crate, it has been patched but the author has not updated crates.io just yet. We have a fork if it goes to long without an update. So 32 bit machines have this issue just now.

Thanks for the report though, we need these.

3 Likes

Can’t wait for this patch update but i will
and learn

2 Likes

@Shona @Scott I want this t-shirt!

1 Like

6 Likes

The sodiumoxide crate has just been updated in crates.io and that has corrected the error you came across (tested on ubuntu 32 bits)

2 Likes

@tfa thanks for the info

cargo clean
cargo update
cargo run
It’s Alive! It’s Alive!

1 Like