  We prove that many, but not all injective factors arise as crossed products
by nonsingular Bernoulli actions of the group $\mathbb{Z}$. We obtain this
result by proving a completely general result on the ergodicity, type and
Krieger's associated flow for Bernoulli shifts with arbitrary base spaces. We
prove that the associated flow must satisfy a structural property of infinite
divisibility. Conversely, we prove that all almost periodic flows, as well as
many other ergodic flows, do arise as associated flow of a weakly mixing
Bernoulli action of any infinite amenable group. As a byproduct, we prove that
all injective factors with almost periodic flow of weights are infinite tensor
products of $2 \times 2$ matrices. Finally, we construct Poisson suspension
actions with prescribed associated flow for any locally compact second
countable group that does not have property (T).
