Skip to content

Commit

Permalink
test: Flip hex endianness of matrix_card tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gtker committed May 16, 2024
1 parent 1a7ee72 commit aa819d3
Show file tree
Hide file tree
Showing 3 changed files with 804 additions and 804 deletions.
8 changes: 4 additions & 4 deletions src/matrix_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ fn create_matrix_indices(matrix_size: usize) -> Vec<u32> {

#[cfg(test)]
mod test {
use crate::hex::hex_decode;
use crate::hex::hex_decode_be;
use crate::matrix_card::{generate_coordinates, MatrixCard, MatrixCardVerifier};
use crate::SESSION_KEY_LENGTH;
use std::convert::TryInto;
Expand Down Expand Up @@ -537,8 +537,8 @@ mod test {
let height: u8 = line.next().unwrap().parse().unwrap();
let seed: u64 = line.next().unwrap().parse().unwrap();
let session_key: [u8; SESSION_KEY_LENGTH as usize] =
hex_decode(line.next().unwrap()).try_into().unwrap();
let expected: [u8; 20] = hex_decode(line.next().unwrap()).try_into().unwrap();
hex_decode_be(line.next().unwrap()).try_into().unwrap();
let expected: [u8; 20] = hex_decode_be(line.next().unwrap()).try_into().unwrap();
let challenge_count: u8 = line.next().unwrap().parse().unwrap();

let mut challenges = Vec::with_capacity(challenge_count as usize);
Expand Down Expand Up @@ -602,7 +602,7 @@ mod test {
let seed: u64 = line.next().unwrap().parse().unwrap();
let challenge_count: u8 = line.next().unwrap().parse().unwrap();
let session_key: [u8; SESSION_KEY_LENGTH as usize] =
hex_decode(line.next().unwrap()).try_into().unwrap();
hex_decode_be(line.next().unwrap()).try_into().unwrap();

let mut v = MatrixCardVerifier::with_specific_parameters(
challenge_count,
Expand Down
Loading

0 comments on commit aa819d3

Please sign in to comment.