private static byte[] GetPasswordByteArray(string value) { return string.IsNullOrEmpty(value) ? new byte[0] : Encoding.UTF8.GetBytes(value); } }