WL-3454 Automatically select the best key length.

Rather than hard coding the key length we do 256 if we can otherwise we fallback to 128 bits.
Shouldn't this be used in line 104?