473,765 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SECURE way to copy parts of a file

Hi,

I need a SECURE way to copy parts of a file. I'm having files which contains
a whole bunch of records. In one 'fysical' file I'm having one or more
logical files.

What I need to do is to copy a logical file (a part of the fysical file)
into a new file. But the 'big' problem is: these records contains
bankstatements, so I can't take the risk that there would be a record
missing, or even one little charachter. The copy I make has to be an
identical copy of the part in the the first file. There can't be a return
too much or too less or something like that.

Does anybody knows a method that ensures me that it will really take that
part of the file and nothing less or more?

Some things that maybe can help to find an easier solution: The logical
files always start at the beginning of a record, so it are always full
records I need to copy, and the records of a logical record are always
grouped together (they aren't mixed up).

It's something like this:
FYSICAL FILE:
record 1: header logical file 1
record 2: data logical file 1
record 3: data logical file 1
....
record 2353: data logical file 1
record 2354: trailer logical file 1
record 2355: header logical file 2
record 2356: data logical file 2
....
record 6222: data logical file 2
record 6223: trailer logical file 2
record 6224: header logical file 3
record 6225: data logical file 3
....
record 8500: data logical file 3
record 8501: trailer logical file 3

I should find a secure way that kind of copy's the whole piece in once (from
header until trailer, like for exemple record 2355 until 6223 in on piece).

Anybody can help me with this?

Thanks a lot in advance,

Pieter
Nov 20 '05 #1
5 1905
Cor
Hi Pieter,

Does the old method of writing it, and then reading it back and comparing it
help you?

Cor
Nov 20 '05 #2
I can use that (and I guess I will), but it's not really a 'nice' way, hehe.
I guess I'm gonna use that to evaluate it, but it would be nice if I'm
having a way that kind of cuts the whole part and pastes it somewhere else,
and than evaluate if it worked fine or not.

"Cor" <no*@non.com> wrote in message
news:OQ******** ******@TK2MSFTN GP11.phx.gbl...
Hi Pieter,

Does the old method of writing it, and then reading it back and comparing it help you?

Cor

Nov 20 '05 #3
Cor
I am not sure, because a code let say that german S what you probably use in
Belgie also, can maybe give in all other solutions give problems when a
station has a wrong language code.

I think you never are totally sure, but I can get nothing better than what I
told you what I would do.

Although thinking it over it would be better to avoid all for us "strange"
characters (but even the Euro character is).

I think that it can always be readed on another way on an other station than
you did write it when the language code is different.

But I have no solution for you for that else than keeping it with the 7 bit
ASCII code but that is to less I gues.

I show it I send you the name of my wife, I think that it will be on your
computer a strange name.

Grazyna.

It has to be Grazyna with a dot on the z.

Cor
Nov 20 '05 #4
Hm, the test with the name of your wife didn't work, maybe you can send your
wife herself so I can redo the test ;-)

There aren't any 'strange' characters in the files: no euro symbol, etc.

But what I actually need is to be able to say: give me the part of that
message, form that line until that line. And not reading the lines and
concattenating the lines myself.

But I guess there isn't something like that, hehe.

Thanks anyways.

"Cor" <no*@non.com> wrote in message
news:OZ******** ******@TK2MSFTN GP12.phx.gbl...
I am not sure, because a code let say that german S what you probably use in Belgie also, can maybe give in all other solutions give problems when a
station has a wrong language code.

I think you never are totally sure, but I can get nothing better than what I told you what I would do.

Although thinking it over it would be better to avoid all for us "strange"
characters (but even the Euro character is).

I think that it can always be readed on another way on an other station than you did write it when the language code is different.

But I have no solution for you for that else than keeping it with the 7 bit ASCII code but that is to less I gues.

I show it I send you the name of my wife, I think that it will be on your
computer a strange name.

Grazyna.

It has to be Grazyna with a dot on the z.

Cor

Nov 20 '05 #5

"DraguVaso" <pi**********@h otmail.com> wrote in message
news:40******** *************@n ews.skynet.be.. .
Hi,

I need a SECURE way to copy parts of a file. I'm having files which contains a whole bunch of records. In one 'fysical' file I'm having one or more
logical files.

What I need to do is to copy a logical file (a part of the fysical file)
into a new file. But the 'big' problem is: these records contains
bankstatements, so I can't take the risk that there would be a record
missing, or even one little charachter. The copy I make has to be an
identical copy of the part in the the first file. There can't be a return
too much or too less or something like that.

Does anybody knows a method that ensures me that it will really take that
part of the file and nothing less or more?

Some things that maybe can help to find an easier solution: The logical
files always start at the beginning of a record, so it are always full
records I need to copy, and the records of a logical record are always
grouped together (they aren't mixed up).

It's something like this:
FYSICAL FILE:
record 1: header logical file 1
record 2: data logical file 1
record 3: data logical file 1
...
record 2353: data logical file 1
record 2354: trailer logical file 1
record 2355: header logical file 2
record 2356: data logical file 2
...
record 6222: data logical file 2
record 6223: trailer logical file 2
record 6224: header logical file 3
record 6225: data logical file 3
...
record 8500: data logical file 3
record 8501: trailer logical file 3

I should find a secure way that kind of copy's the whole piece in once (from header until trailer, like for exemple record 2355 until 6223 in on piece).
Anybody can help me with this?

Thanks a lot in advance,

Pieter

Long time no see kiddies! I think in addition, why don't you look into
useing hash values for the files. .NET can generate MD5 hashes for files,
and if 1 charactor changes, basically, any bit change in the file will
change the hash and make the files not compaire. I replaced all my checksum
systems (CRC, GNU-GPC) with MD5 hashes because it's quick and in the
framework already. I do have a class alread built if you need something to
start with.

HTH
Sueffel
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
6798
by: Boris Genc | last post by:
Hi everybody. I was wandering is there a method or a function already implemented in python that supports secure deletion of data? I'm interested in something which is able to securely wipe data (from single file to bunch of MB's), and that should run both on Linux and Windows. I tried on google, but I hadn't found anything useful to me.
6
2431
by: Maria L | last post by:
I have a client who needs to copy an existing sale. The problem is the Sale is made up of three tables: Sale, SaleEquipment, SaleParts. Each sale can have multiple pieces of equipment with corresponding parts, or parts without equipment. My problem in copying is when I go to copy the parts, how do I get the NEW sale equipment ids updated correctly on their corresponding parts? I can provide more information if necessary. Thank you!!
7
2689
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be updated every hour or so. How can I do this easily? I would like to use secure communication even encryption if possible. I would query and insert locally only the newest records found in that XML file to an xml or MS access db.
68
3716
by: Roman Ziak | last post by:
Hello, I just downloaded MS Visual Studio 2005 Express Beta. When I tried to compile existing valid project, I get a lot of warnings like 'sprintf' has been deprecated, 'strcpy' has been deprecated etc. I opened STDIO.H and figured that one has to define a macro _CRT_SECURE_NO_DEPRECATE to stop these warnings. I started to search internet and found few links, and the following proposal
2
1491
by: Mullin Yu | last post by:
i want to find a secure ftp library for uploading and downloading files.
4
2033
by: jack | last post by:
Hi all I have have a web service in c$ which was a pretty easy task, but the task seemd to be difficult when came to security.. i have had a vb6 application which sends xml file and gets a request in xml format. guys is there any idea how can i make a secured connection request and response in this . Please help .
14
4613
by: Usman | last post by:
Hi I'm working on an application that contains classes for licensing, authentication etc, including all the algorithms of encryption/decryption etc. I wanted to secure this code, but after compiling all the code, I just thought of trying a decompiler on the output file. The decompiler generated almost 99% of the exact code out of it, exposing all those algorithms that I need to secure. Even if I try a dotfuscator tool, still it does'nt...
1
1359
by: Todd Sparks | last post by:
I am developing with VB.NET 2005 and I need to copy a file from somewhere on the users machine to a secured location on the server. I am creating an image archive system that will allow users to select image files from basically anywhere, once they add the file to the archive I will write any metadata that they enter about the file to my database then I want to copy the file to a hidden secure location on the network. I want this location...
19
2849
by: Khafancoder | last post by:
Hi guys, in my db i have these three tables 1.Stores 2.Products 3.Parts their structure is something like : Stores ----Products ----Parts
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.