CSE 132 (Spring 2011)
Quiz 3: Practice Problems

Network representations
  1. How do you send (and receive) a short, int, and long using Sockets, assuming you can send just one byte at a time (using OutputStream, not DataOutputStream)?
  2. Using ASCII, and OutputStream, how do you send (and receive) a Java String?
  3. Devise a protocol for transmitting a boolean using OutputStream. Now show the corresponding code to read what you sent and form the proper boolean to represent the transmitted value.
  4. Devise a protocol to transmit an array of ints, assuming writeInt(i) properly transmits a single int.
Encryption
  1. What is an effect attack against the Caesar cipher?
  2. Given the ASCII table, an input string of 4 ASCII bytes, and a key of 4 ASCII bytes, what is the encryption obtained by exlusive-or, expressed in hex format (2 hex characters per byte)?


Last modified 09:33:09 CDT 31 March 2011 by Ron K. Cytron