Ongoing File Encryption / Efficiency

Jul 13, 2011

I'm looking for advice/ideas in regards to ongoing file encryption.I have an event that fires frequently that contains small amounts of data passed through the eventargs.This data is then written out to disk (currently unencrypted).I need to encrypt this data (which, I can do).My attempt in the first five minutes was unencrypting the file, appending the data and reencrypting the file.This obviously works, but is pretty inefficient and not going to be my solution since the file could grow rather large and the resources to unecrypt/ encrypt grow larger as the file grows larger.My next thought was to encrypt each set of data as it's written out and have some kind of marker in the file to denote where to split so I could unencrypt each chunk to reproduce the original file.I'm leaning towards this approach now (though by encrypting small chunks of data multiple times, the file size will be considerably larger.As an example, if I encrypt each letter of the alphabet the file is approx 8 times larger than if I encrypted a string with all of the letters of the alphabet in this case each files decrypted content would be identitcal).

View 3 Replies


ADVERTISEMENT

Get An Ongoing List Of Your Threads In Forum?

Mar 25, 2012

I found it quite difficult to find a thread from a few months back as I wanted to use the URL to that thread to show in another today. If you're willing to update this periodically (it'll only keep the last 100 of your threads/replies), this might get you started on a way to save them on your computer from now on.

Start by clicking on your own name (you can also use go to "View Profiles" and find it), then look for the following

[code]...

View 2 Replies

Real Time Form Updating - Keep Single Threaded - Ongoing Maintenance

Dec 14, 2009

I have an app that I'm trying to keep single threaded, mostly for reasons to do with simplicity of ongoing maintenance. I've structured it so that I can eventually multi-thread it if need be but I'd rather not at this point. It's semi-real time and does perpetual looping to display a number of different graphs and do various work with both the graph display and the work being hosted in their own respective objects. If you're familiar with the Windows dispatch manager it's that general paradigm run synchronously. And yee haw, it pretty much works at this point and runs fast enough to meet requirements by a happy margin. I have a cosmetic problem that I'd like to solve if I could. When I left-click and move any form around, my graphs stop updating until I release the left click button. I was thinking about a doevents somewhere in the click event catalog.

View 1 Replies

Encryption/Decryption - Code To Encrypt A File->networkstream->Decrypt The File

Feb 28, 2011

I'm having trouble writing the code to encrypt a file->networkstream->Decrypt the file.. I've tried several ways, but I keep failing....

View 1 Replies

Encryption - Decrypted File Is Larger Than Source File?

Jun 15, 2012

ive been trying to use System.Security.Cryptography to encrypt and decrypt a file but its not working for me

this code

Private Sub EncryptFile(ByVal sInputFilename As String, ByVal sOutputFilename As String, ByVal sKey As String)
Dim fsInput As New FileStream(sInputFilename, FileMode.Open, FileAccess.Read)
Dim fsEncrypted As New FileStream(sOutputFilename, FileMode.Create, FileAccess.Write)
Dim DES As New DESCryptoServiceProvider()

[code]....

called with

DecryptFile(OpenFileDialog1.FileName, SaveFileDialog1.FileName, "12345678")[/CODE]

outputs a file that is almost 2x as large as the source file that was encrypted.

View 1 Replies

Compressible Encryption In PST File?

Apr 13, 2012

I would like to read the contents of an existing Outlook 2007 PST file by VB.Net. I find already the file and record structure, this is not a problem. But I have a problem with the compressible encryption how is used. Now I have read that this encryption is based on a simple byte-substitution cipher with a fixed substitution table. But unfortunately I can't find this table. Maybe someone can help me where to find this table or where I to find all the necessary information about compressible encryption.

View 7 Replies

Encryption Of Video File?

Aug 4, 2009

Imports System
Imports System.IO
Imports System.Security
Imports System.Security.Cryptography

[code]....

The above code is used by me to encrypt .avi files and it worked very well but the problem is that if the size of my video file is greater than 200 mb memory overflows probably as the code copy the whole input file into ram and then process it hence it put limitation of hardware,is there any better way to do it so that files > 200 mb could me encrypted in PCs with 1gb ram?

View 5 Replies

Use Encryption While File Transfer Via Internet?

Jun 16, 2011

1. How much load or data size our custom encryption/decryption algorithm can handle? E.g. what's the limit of file size that normal encryption/decryption algorithm supports.

2. What's the best way to use encryption while file transfer via internet?

3. Where and when encryption and decryption has to apply while uploading and downloading content from internet(Hosting on client or server machines)?

4. What type of algorithms suites for above approaches?

5. How much time it takes to encrypt / decrypt data for 10 MB, 100 MB, 1 GB etc

View 1 Replies

Make A Key That Will Be Used In File Encryption/decryption For An Application?

Jul 12, 2011

I am trying to make a key that will be used in file encryption/decryption for my application. However, there is no user data involved with this application (As i would usually use the user's password to generate the encryption key), so i have to turn to another method.

I am thinking that maybe it is possible to generate a completely random key the first time the program runs, then save this key inside the program so that it is inaccessible by the user. The user will not be shown this key, but the key MUST be randomly generated for each application, and it also must stay constant once it is created.

View 1 Replies

.net Encryption Result Does Not Match The Xcode Encryption Result Given The Same Input Parameters?

Jun 21, 2011

I have set up a method in vb.net and in xcode for encrypting a string using as far as i can tell the same parameters for an AES encryption.I've looked all over the place but cannot find information on whether they use the same encryption algorithm and settings.

this is the vb.net code:

Dim encryptAES As New AesCryptoServiceProvider()
Dim encoding As New UTF8Encoding()
Dim encryptor As ICryptoTransform
encryptAES.Key = encoding.GetBytes("12345678901234567890123456789032")
encryptAES.IV = encoding.GetBytes("1234567890123416")
encryptAES.Mode = CipherMode.CBC

[Code]...

View 1 Replies

.net - Rijndael Encryption Code Is Not Working For Large File?

Oct 1, 2011

I use the following Rijndael code to do encryption without fail for many times. But why it can not encrypt an ISO file with 4.2 GB? In fact my computer has 16GB memory and it should not be a memory problem. I use Windows 7 Ultimate. The code is compiled as winform (.Net 4) using Visual Studio 2010 (a VB.NET project).

I have checked that the ISO file is OK and can be mounted as virtual drive and even can be burnt to DVD rom. So it is not the ISO file problem.My question: Why the following code cannot encrypt an ISO file with size of 4.2GB? Is that caused by the limitation of Windows/.NET 4 implementation?

[Code]...

View 2 Replies

Encryption Of A Text File + Decryption For Security Program?

Feb 10, 2011

What I've decided to start working on is pretty much a personal project but something I may use in my UNI course in due time. I'm creating a security program with a set of access codes (yes I am a bit of a star trek fan) - 4 in total to be exact. I want to be able to use an Encrypted key file in form of a simple notepad created text file to update the codes at any due time. All I'm looking to do is write the access codes to the text file (say for a friend to use the program), Encrypt the file through the program and be able to also decrypt to obtain the new access codes on demand also via the same program. Once decrypted the codes can be read and verified if the user has entered each one correctly. I could hard code the access codes into the program but would rather do it the way I've thought of.

Back in the days of the old VB6 there was a simple method but for some reason that doesnt work any more. What I guess I'm looking to do is have 4 text fields where 4 digit access codes are typed into, have the program take them and encrypt each one is then written to the text file. Hoping that will make it a bit clearer what I'm trying to achieve as I think I made it sound like I want to encrypt the text file after the info has been written to it, which is of course one option so wouldn't mind know how to do that too!

View 3 Replies

File Encryption By Using The Imports System.Security.Cryptography?

Feb 16, 2010

I'm working on a basic file encryption by using the Imports System.Security.Cryptography.I was thinking of putting a password as a final security measure.Would i have to store the password inside the file or how will this work?

View 12 Replies

.Net Stack Collection Efficiency?

Apr 15, 2009

I've started using .Net's stack collection. The basic features I guess are the "pop" and "push", where you add or take off the top element of the stack (if you are referencing other elements in the stack then another collection type is probably better).[URL]..it appears that the Stack collection (like other collections) is basically an array with some window dressing (so you actually can see other elements). As far as I can tell, "popping" and "pushing" is changing the first element of the array. Shouldn't instead the final element be the "top" of the stack and be the one that is changed? Otherwise the program has to reindex all the other elements in the array every time a pop or push is made. This seems very inefficient. But this is what Microsoft's description appears to be saying what is happening.

View 10 Replies

Difference When We Compare The Efficiency Of .NET And C#?

Jan 19, 2012

For example, when the codes are compiled, will VB.NET tend to be slower than C#? Or are there any major features in VB.NET / C# that we cannot find in the other language?

View 1 Replies

Process Efficiency And Possible Way To Parse

Aug 9, 2010

So i am working on a program that needs to run NSLookup for a Computer name specified by the user. Here is the code I have developed which works:[code]Now because of the dynamic domains that this will be on, it is difficult to nail down which character to start a read at to determine if the Computer name exists. For some reason the reader is not picking up the '***Non-existent' line that is reported from NSLookup. When i run the NSLookup it requires me to run the Function 2x before it displays a result in my lblresults. With that pre-knowledge,

1. How do i make the NSLookup Process more efficient?

2. Is there a better way to Parse the information to specificly pull the lines that have been reported back, specificly the '***Non-existent' line.

View 1 Replies

Efficiency Of Using Try - Catch To Test A Condition

Oct 19, 2009

Tell me if this is efficient code. or if there would be a more efficient way of doing this:

CODE:

I'm wondering if error catching will take more. time than a few more lines of code to accomplish the same.

View 3 Replies

If Statement Efficiency - Reducing The Code ?

May 27, 2011

How would you go about reducing the code for this but still allowing it to work the way it is now

Dim updatelesson As String = cmbChange.SelectedIndex
Dim chosenlesson As String = cmbSession.SelectedIndex
Dim changed As String = lstNames.SelectedItem

[CODE]....

View 3 Replies

Loop Variable Declaration Efficiency?

Jan 27, 2012

wondering about the relatively efficiency of declaring oop variables in the loops, emselves, or declaring them before first use. Here are some examples:Declare early:

Dim ix As Integer
Dim currentNode As System.Xml.XmlNode
For ix = 1 To 100

[code].....

View 9 Replies

Test My Codes Efficiency In Program?

Jun 25, 2011

How can I test my codes efficiency in vb.net?

View 1 Replies

VS 2008 Efficiency Comparison Of Nested Ifs?

Jul 20, 2010

which is more efficient?(Assume case statements, etc., cannot be used.)

If a Then
If x Then
ax()
ElseIf y Then

[code]....

View 4 Replies

Unrecognized Attribute 'configProtectionProvider' When Trying To Access Settings After Encryption Of Config File?

Dec 19, 2011

I recently changed application settings to be in an encrypted config file.The first time I run any application and try to retrieve a setting (My.settings. ...) from the config file I get an Unrecognized attribute 'configProtectionProvider'If I restart the application I don't get an error due to the fact that it doesn't re-encrypt during that run. Why when I run the application for the first time am I getting this error?

I am encrypting the config file on application startup using the following code:

[Code]...

View 1 Replies

VS 2010 - File Saving - Simple Pseudo-encryption Program That Changes Each Character Into Another

Apr 22, 2011

I recently made a simple pseudo-encryption program that changes each character into another. It is capable of encrypting and decrypting a string. This can also be done to any text file as well. The characters range from ASCII 32-254 (This on it's own may be an issue because of #127 being DEL).

Because I believed my own coding may be at fault, I attempted this with Triple Des with identical results.For Triple Des, the requirements for en/decryption was:

Encrypt: String to Byte
Decrypt: Byte to String

And to change them either direction, I used UTF8. I also attempted ASCII and UTF32, but I don't know what I should do. I am considering dropping this but I want to learn problems like this because I am currently in college and haven't started my core classes for programming yet and want the head start.

The point where I have come into a problem is attempting to do this to another file type like an image. I looked at the results from encrypting then decrypting and the results were similar, but it seems file encoding must be the culprit.

View 3 Replies

Where Is The Proper Location To Embed IV Information For File Encryption Using Rijndael Algorithm?

Sep 29, 2011

I'm creating a Rijndael file encryption application. I will using a unique IV for each file encryption.

My question: Where is the proper place to embed the IV info?

My initial thought is to append it at the end of the file's content. Is that a good choice?

View 1 Replies

IDataReader To Delimited String Function Efficiency?

Nov 16, 2009

I have a function that I use to export the contents of anything that implements IDataReader into delimited string (that I can then write to disk or send to a response stream). It works, and it's quick for smaller recordsets but gets bogged down once the record counts get over a thousand (I have something that does the same thing only it writes to a new Excel spreadsheet and it runs in about 25% of the time). I understand that with record sets that are very large, this could cause a memory issue since I'm reading it into a string, but typically these won't be any larger than 100k (if written out to disk). My question is, here's my function, is there anything you can spot that I could do more efficiently (like, I suppose I could stream line by line to the response in asp.net, or line by line to the file on a console app, I haven't tried that).

[Code]...

View 1 Replies

VS 2005 By Reference Variable Memory Efficiency

May 27, 2009

I'm building SQL statements with a bunch of values from a dataset. Obviously that gives some really long names to put inline or even in parameter. addwithvalue code so beforehand I just declare a bunch of variables with really short names and assign them to the DS's exact fields like: [code] but this way I'm putting all the data in the dataset into memory twice by copying it into a new variable, right? So I was thinking, if it's just a string variable representing a field on the dataset, why not declare it by reference so the variable is basically a handy nickname pointing to that field in the dataset.Will it even work to have a string declared by reference and connected to one value inside of a dataset? And if so, will that stop duplicating everything in memory? I forgot how to declare a variable as a reference to another variable instead of the normal way in VB.

View 12 Replies

Update Records In MVVM Pattern For Maximum Efficiency?

Mar 14, 2012

This is more a conceptual question. Here is my current predicament; I am writing a vb.net WPF application and using the MVVM pattern (love it! maintainability is just amazingly awesome). Currently all the code is written by hand and there is no use of NHibernate or Entity Framework as the backend is an access database (due to policy I cannot use NH and EF doesn't support JET Databases, we may switch to MSSQL at some point but that may be a while from now).[code]...

View 1 Replies

Multithreading Efficiency (Reuse Background Worker Subs / Functions?)

Oct 3, 2011

I have an application that queries DHCP and pulls scope/subnet information. There are roughly 8k scopes on our network to query so reporting this data takes a little bit of time. I currently have this running on it's own thread and reporting to a progress bar so the applications doesn't seem inactive.

The DHCP api functions can report a total, a max read and a resume argument. This means that I can, in theory start 4 threads and have each thread read through 2k subnets, so it will only take 1/4 of the time to read all this data. Would I need to create four separate background worker handlers, do_works, runworkcomplete, report progress etc.?

View 3 Replies

Efficiency Of Oledb - Got 10+ Users Using Files, Via A Oledb To Put Info Into An Excel Spreadsheet

Oct 18, 2010

Just wondering if i might hit a snag in my program. Ive got 10+ users using the same files, via a Oledb to put info into an excel spreadsheet. If 2 or more people save there file at the same time will the program go into read only on one person. Normally one 3 will use the file at one time. I know Sql itself would be better to use. best way i can describe it, normally using excel if you manage to open the same file twice one opens as normal but the other opens as a Read only file, will the same thing happen if im using Oledb connections?

View 2 Replies

.Net Using RSA Encryption?

Mar 25, 2012

is there anyway that I can convert this to use RSA encryption?

Imports System.Text
Imports System.Security.Cryptography
Imports System.IO
Public Class ClsEncryption

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved