code: func (e *encryption) Transcrypt(i int, in []byte, out []byte) {
  	// first hash key with counter (initial counter + i)
  	hasher := e.hashFunc()
  	hasher.Write(e.key)
  
  	ctrBytes := make([]byte, 4)
  	binary.LittleEndian.PutUint32(ctrBytes, uint32(i)+e.initCtr)
  	hasher.Write(ctrBytes)
  
  	ctrHash := hasher.Sum(nil)
  	hasher.Reset()
  
  	// second round of hashing for selective disclosure
  	hasher.Write(ctrHash)
  	segmentKey := hasher.Sum(nil)
  	hasher.Reset()
  
  	// XOR bytes uptil length of in (out must be at least as long)
  	inLength := len(in)
  	for j := 0; j < inLength; j++ {
  		out[j] = in[j] ^ segmentKey[j]
  	}
  	// insert padding if out is longer
  	pad(out[inLength:])
  }
docs: // used for segmentwise transformation
  // if in is shorter than out, padding is used