Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > d0f84c65bfdfda037b021ed34815337c > files > 108

libmetakit-devel-2.4.9.7-9.0.mga1.i586.rpm

<html><head>
	<title>Metakit sample code - MyIO</title>
</head><body bgcolor=white>

<font face=Helvetica size=3>

<!--begin-->
<h2><img src="e4app.gif" alt="App Icon" border=0 align=left>
Metakit sample code - MyIO</h2><br clear=left>

<p>This example demonstrates how to setup low-level datafile encryption with Metakit.</p>

<p><b>What it does</b>: MyIO creates a simple view on disk, and then loads it back in.
The data on disk is stored in a simple encrypted format.
</p>

<p><b>What it illustrates</b>: This sample program shows how to customize Metakit
via its "Strategy" object. <p>Just to show it can be done, MyIO also disables all
flush calls issued by Metakit.  This slightly reduces the fail-safe properties but
improves performance with frequent commits on systems which implement caching using
 "lazy writes" (such as Windows).<p>The source code of this
application can be compiled for 32-bit Windows (as console application)
as well as for 16-bit DOS targets. MyIO has no practical use, but it contains a 
"CEncryptStrategy" class which you can adapt to suit your purposes. </p>

<p><b>How to use it</b>: When you launch MYIO.EXE, it creates a datafile called "secret.dat",
saves some string data to it, then reads that back and displays these strings.
<p>Note that due to the encrypted
storage format you can NOT use the Metakit dump utility to examine the contents of the data file.
You can of course build your own version of it, since all the necessary source code is included.

<p><b>Known problems</b>: None.</p>

<p><b>Files in EXAMPLES\MYIO</b>: </p>

<p>MYIO.CPP - MyIO main program 
<br>MYIO.MAK, MYIO.MDP - MSVC 4.2 project makefiles for Win32 
<br>MYIO16.MAK - MSVC 1.52 project makefile
<!--end-->

<center><p><hr size=1>
||
&nbsp; <a href="index.html" target="_top">Roadmap</a>
&nbsp; <a href="classes.html">Class Index</a>
&nbsp; <a href="samples.html">Sample Index</a>
&nbsp; ||
&nbsp; <a href="intro.html">Introduction</a>
&nbsp; <a href="tips.html">Tips and Tricks</a>
&nbsp; || 

</center>
</font>

</body></html>