add lock for Close()
add locks to all encryption contexts