mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix nonce generation (offset should be bytes, not pages)
This commit is contained in:
parent
26efde0a71
commit
d489e14f3a
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ impl SwapWriter {
|
||||||
};
|
};
|
||||||
let mut nonce_vec = Vec::new();
|
let mut nonce_vec = Vec::new();
|
||||||
// use BE encoding because nonce is cryptographic matter
|
// use BE encoding because nonce is cryptographic matter
|
||||||
nonce_vec.extend_from_slice(&(offset as u32).to_be_bytes());
|
nonce_vec.extend_from_slice(&((offset as u32) * 0x1000).to_be_bytes());
|
||||||
nonce_vec.extend_from_slice(&header.partial_nonce.to_be_bytes());
|
nonce_vec.extend_from_slice(&header.partial_nonce.to_be_bytes());
|
||||||
let nonce = Nonce::from_slice(&nonce_vec);
|
let nonce = Nonce::from_slice(&nonce_vec);
|
||||||
// println!("nonce: {:x?}", nonce);
|
// println!("nonce: {:x?}", nonce);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue