- Larry's hashlib PR
- my blake3-py branch that patches the tests
- the only commit currently on that branch
Scroll down to see the test output on my machine.
My procedure for running these tests (on Arch Linux):
| #[cfg(unix)] | |
| std::arch::global_asm!( | |
| "with_rsp:", | |
| "xor rax, rax", | |
| "add rax, rdi", | |
| "shl rsi, 1", | |
| "add rax, rsi", | |
| "shl rdx, 2", | |
| "add rax, rdx", | |
| "shl rcx, 3", |
Scroll down to see the test output on my machine.
My procedure for running these tests (on Arch Linux):
| const std = @import("std"); | |
| const Allocator = std.mem.Allocator; | |
| const ArrayList = std.ArrayList; | |
| const Person = struct { | |
| pet: Pet, | |
| const Self = @This(); | |
| // Takes ownership of pet. |
| [package] | |
| name = "scratch" | |
| version = "0.1.0" | |
| edition = "2021" | |
| [dependencies] | |
| hex = "0.4.3" | |
| hkdf = "0.11.0" | |
| sha2 = "0.9.8" |
| . |
| const PYTHON_PROGRAM: &str = r#" | |
| import sys | |
| print("something for stdout") | |
| print("something for stderr", file=sys.stderr) | |
| "#; | |
| fn main() { | |
| let logf = std::fs::File::create("logfile.txt").unwrap(); | |
| duct::cmd!("python", "-c", PYTHON_PROGRAM) |
| message: b'' | |
| padded message: | |
| b'\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + | |
| b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + | |
| b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + | |
| b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
| message schedule: [ | |
| 2147483648, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, | |
| 2147483648, 0, 2117632, 0, 570427392, 0, 84448578, 2147483648, |
| use rand::prelude::*; | |
| use std::io::prelude::*; | |
| fn main() { | |
| let random = thread_rng().gen_range(1..=100); | |
| println!("Guess a number between 1 and 100"); | |
| for line in std::io::stdin().lock().lines() { | |
| let parsed = line.expect("io error").parse::<i64>(); | |
| let guess = if let Ok(n) = parsed { n } else { continue }; | |
| if guess < random { |
| 0eNrdnU1uI8kRRq/S4NIgB5X/mVrM1gtvDXhhDASKqpYKTZFykWxMe6AD+B4+mU/iojgtlqQKfl9G99geb2YgNvWYVRkvKvJHyV9mN+tD+9h3m/31zXb7aXb1y/mV3ezqr6Mfj//Wrbab08u77m6zXB9f2395bGdXs27fPszms83y4fjT5rBat8t+0bfL1X7bz57ms25z2/48uzJPP81n7Wbf7bv2hHr+4cv15vBw0/bDG14g6+1dt9t3q8Xqvt3tFwOp+9wuHvvt5+52eOd89rjdDZjt5tiMIzqkH8J89mV2tfDuh/D0NH8Hty/wbrNr+z3C2AEzn912fbs6vcNPQJ3U4r7922H4//SH5Fdtnc9+ffP1x249/Mbp1ny9Zy8fcOiXm+7wsPh4aNeLVbteD+TV9nDsneHGTrTNUxec31zw0M37fru+vmnvl5+7of+GN666fnXo9tfDv92+/PbHrh+a/C4YPnf9/rBcn+Ph9I7hhtzOTvjdfnlsdHP84eFx2S+PUXI1+9c//jl7Or1jc7rluyPWHP9z/OVRvHTDT2G45uHd289t3w8xcT1QV5+G5vy9Pd6P93cjnBt0uBne/HwZ7+9HNF97hm/KODCOP6c3P9tk373iTs3ftN3d/c328Nzpw/vmw79M9WXUxFl0/5E4S0ycjdry/x1nWZ/Dokc5rFC32tflMNO8UD/1iyGWhn5/7B7bxX67uOuHnr+d+JAmvnyIoT7ETH/IZXQzfRvMOZfft8v9ov15db/c3E3ejeac4Bqime41WWpifnX1UyDPgQoEBQpkGgiKHMhAUOLv/ojG3P3MNdHCJhYO5BDINhXX6muu1RquiR420XKgAEFc7JsIQVzsmwRBgU4aBiYNG3lYgrDEXSLME5YMeZgnbKmI1FITqa6hmmhhBnJcyFuYgVxF/re26lo5ByzMQI5zwMIM5Lj8b2GecFz+tzBPuIr8P6Ixd5+TwcIM5Lj8b2EG8hX531ZVGp6UAWYQz+V/CzOI52LfQc89F/sOeu4 |