Skip to content

Commit

Permalink
fixup! Implement tr_serialize and tr_deserialize
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Brand <simon.brand@postadigitale.de>
  • Loading branch information
brandsimon committed Oct 25, 2023
1 parent e431be5 commit f2f86c7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,12 @@ mod test_tr_serialize_tr_deserialize {
.unwrap()
.key_handle;
let data = context.tr_serialize(key_handle.into()).unwrap();
let new_handle = context.tr_deserialize(&data).unwrap().into();
// Load handle in a new context
let mut context_new = create_ctx_with_session();
let new_handle = context_new.tr_deserialize(data).unwrap().into();
assert_eq!(
context.read_public(key_handle).unwrap(),
context.read_public(new_handle).unwrap()
context_new.read_public(new_handle).unwrap()
);
}
}

0 comments on commit f2f86c7

Please sign in to comment.