AggrorJorn Posted January 7, 2013 Share Posted January 7, 2013 Does anybody have a recommended C++ library for data serialisation? I want to store it more securely instead of having it freely accesable like XML. Quote Link to comment Share on other sites More sharing options...
Canardia Posted January 7, 2013 Share Posted January 7, 2013 I would use a sqlite3 database, because then you can also load and save only parts of a level. And then use blowfish2 for encryption. 1 Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Flexman Posted January 7, 2013 Share Posted January 7, 2013 XML supports encryption and security certificates. If you're using a library that supports that, might be worth looking at. It's what I'm currently doing in my day job. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 7, 2013 Author Share Posted January 7, 2013 I currently have my own library (C#) that I use to generate xml files. Instead of creating my own library I really want to use a C++ library that has more advanced features. Quote Link to comment Share on other sites More sharing options...
ParaToxic Posted January 7, 2013 Share Posted January 7, 2013 You can use boost::serialization. It is very fast and has a very good syntax Quote Link to comment Share on other sites More sharing options...
ChrisMAN Posted January 7, 2013 Share Posted January 7, 2013 Most of the c# serialization coolness is from reflection. C++ doesn't so much have that. There is some cheezy ms proprietary reflection thing... I would be curious to see if c++ has an automapper. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 7, 2013 Share Posted January 7, 2013 I recommend against serialization. There's always data you don't want to include, or data that doesn't translate well. Your class structure WILL change and invalidate all your serialized data. Just write your save routine and decide what data is important. Don't look for a magic routine to make life easier. </offsoapbox> 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 7, 2013 Share Posted January 7, 2013 Your class structure WILL change and invalidate all your serialized data. This is a very real and serious drawback with serialization as a save mechanism! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 8, 2013 Author Share Posted January 8, 2013 What do you use for encrypting your data? Quote Link to comment Share on other sites More sharing options...
Roland Posted January 8, 2013 Share Posted January 8, 2013 Here is a bunch of the most common ones with some source code http://embeddedsw.ne...rence_Home.html I have used some of them at work, but for game development not. 1 Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Matthew Nicholls Posted January 8, 2013 Share Posted January 8, 2013 Why not just use your xml file but put it in a password protected zip and stream it from there? Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 9, 2013 Author Share Posted January 9, 2013 Why not just use your xml file but put it in a password protected zip and stream it from there? I don't know, it just doesn't 'feel' right to do it that way. That may be a bit vague. It will probably work just fine. Quote Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted January 10, 2013 Share Posted January 10, 2013 Maybe you could just obfuscate the data and keep a private key within your source-code? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 10, 2013 Share Posted January 10, 2013 Why worry about that at all? If the user wants to edit some text files and advance to level 10, why not let them? 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Flexman Posted January 10, 2013 Share Posted January 10, 2013 Whatever works. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Roland Posted January 10, 2013 Share Posted January 10, 2013 Yep.. I totally agree with Josh. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted February 10, 2013 Share Posted February 10, 2013 As an alternative, you could use the ProtoBuf library with build-in serialization that's faster than typical XML types. Saving the bytes to file may be obfuscated enough. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.