public static byte[] EncodeIntFromString(string s) { int res; if (!int.TryParse(s, out res)) return null; return ConvertToBytes(res); }