Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #![rustfmt::skip::macros(named, do_parse, call, take)]
  2.  
  3. fn main() {
  4. named!(from_bytes<ClientHandshake>, do_parse!(
  5. pk: call!(PublicKey::from_bytes) >>
  6. nonce: call!(Nonce::from_bytes) >>
  7. payload: take!(ENC_PAYLOAD_SIZE) >>
  8. (ClientHandshake { pk, nonce, payload: payload.to_vec() })
  9. ));
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement