|
Security through obscurity doesnt count. Basically this scheme is as strong as both of your encryption schemes (an attacker would have to break both). The one time pad aspect adds nothing. (Apart from tripling the size of your data).
Homebrew encryption is never really the answer. If you don't think either algorithm is strong enough for the task at hand (or is likely to be broken while the data should still be secret), then just take your data, encrypt that with method A, then the result with B.. etc.
You might also want to consider that an attacker would choose to go for the much easier "rubber hose cryptoanalysis" by convincing your friend to provide any passwords and keys, because thats going to be easier than breaking well-respected cryptographic algorithms.
|
|
|
|
|
Hi
In my application i am downloading mails from server.I am saving all
the mail information into database like to,from,cc,bcc,body.
While saving all information to database i am having one problem.
Suppose my mail body contain html table and message is written in
html table then when am saving mail body to database i am getting
all html tag like <htm> like this all the html tag are
also saved into database but i want to avoid html tag while saving
mail body to DB.How can i do this.Can anybody help me to solve this.
I am using pop3 protocol and indy socket liabery.
Thanks.
-- modified at 11:55 Monday 20th August, 2007
Rahul.
|
|
|
|
|
with the understanding that the format will be all messed up... take the body of email and loop through the text finding the next < if after the < is an html tag then look for the > and replace that with "". keep doing this until you are done.
|
|
|
|
|
i tried to use the winformclient project at this location
http://www.codeproject.com/dotnet/FTPWinFormClient.asp
& i used the code in vb.net 2003 but i get the below error
'System.Collections.Specialized.StringCollection' cannot be converted to 'Indy.Sockets.TIdStringsFCL'.
in
drawDirectoryContents() at
lFtp.List(ls, src, True)
where ls is a string collection object
i used CType to convert ls into 'Indy.Sockets.TIdStringsFCL
even then i get the same error.
Can anyone help me with this .Below is the code
Private Sub drawDirectoryContents()
statusBar1.Text = "Listing directory contents .."
lstDirectory.Items.Clear()
Dim ls As System.Collections.Specialized.StringCollection = New System.Collections.Specialized.StringCollection
Try
lFtp.List(ls, src, True) 'getting error at this line
Catch ex As Exception
statusBar1.Text = ex.Message
Return
End Try
Dim obj1 As Object
Dim file As String
For Each file In indychild
lstDirectory.Items.Add(obj1)
Next
For Each file In ls
lstDirectory.Items.Add(file)
Next
End Sub
|
|
|
|
|
padbindu wrote: i used CType to convert ls into 'Indy.Sockets.TIdStringsFCL
even then i get the same error.
I have no idea what a TidStringFCL is, but it's plainly not a string collection. You can't just magically cast stuff, it needs to define a conversion. Can you build an instance of the class you need in code, using your string collection ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi. I'm writing radio station scheduling software for my 3rd year project. I'm looking for something to use to store and display mp3/mp4 metadata along with the appropriae playing times for the various songs. The schedule needs to be saved and allow for scheduling in advance. It will cover the full day-to-day scheduling for the radio station. If anybody can give me any advice on what I could use and a possible starting approach I would really really appreciate it. Thanks
Mr Oizo
-- modified at 8:51 Tuesday 21st August, 2007
|
|
|
|
|
Database, database, and finally database. First create the necessary tables in a database and populate them with data. Once all that is done, you can start writing your app by designing the business layer, in other words, the rules by which you need to create schedules, etc. and only when all that is done you start making the necessary form(s) to handle all possible interaction with the business layer (exceptions in schedules, etc) and the database (adding new songs, etc).
Very important! Try to design all business logic into your database (For example: song 1 may never be played on Friday: Table_Songs.NoNoDay = "Friday"), and hard code as little as possible.
Good luck with it,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi
In my application i am creating a text file and write some text to
it then i am checking if file exist or not if exist i want to write
to a new line but while doing i am getting an error.
Object reference not set to instance of an object.How can i do this.
Plesae guide me to do this. my Code is as follow.
for i= to Count<br />
Dim id As String = xMsg.MsgId()<br />
Dim sFileName As String<br />
sFileName = "C:/text1.txt"<br />
Dim newline As String = String.Empty<br />
'Dim tw As TextWriter<br />
If Not IO.File.Exists(sFileName) Then<br />
MessageBox.Show("File Not Found")<br />
Dim TextFile As New StreamWriter(sFileName)<br />
<br />
TextFile.WriteLine(id)<br />
TextFile.Close()<br />
Else<br />
MessageBox.Show("File Found. File was created on: ")<br />
'Dim TextFile As System.IO.TextWriter<br />
Dim TextFile As StreamWriter<br />
<br />
TextFile.WriteLine(id)<br />
TextFile.Close()<br />
<br />
End If<br />
<br />
Next
Thanks.
Rahul
|
|
|
|
|
Hi rahul.net11
To solve the problem
Example:
dim str as string
str= " vbcrlf "
TextFile.WriteLine(id & str)
Rami Abd Alhalim
|
|
|
|
|
Hi
Sorry this soluation Correct
TextFile.WriteLine(id & vbCrLf)
Rami Abd Alhalim
|
|
|
|
|
Thanks.
For your rply.I tried it.
df
|
|
|
|
|
hi rahul,
use following procedure
Private Sub CreateTextFile(ByVal FilePath As String, ByVal data As String)<br />
Dim oFile As System.IO.File<br />
Dim oWrite As System.IO.StreamWriter<br />
Dim oRead As System.IO.StreamReader<br />
Dim PreviousData As String = ""<br />
Dim CheckHypen As String<br />
<br />
If File.Exists(FilePath) Then<br />
oRead = oFile.OpenText(FilePath)<br />
While oRead.Peek <> -1<br />
If PreviousData = "" Then<br />
PreviousData = oRead.ReadLine()<br />
Else<br />
CheckHypen = oRead.ReadLine<br />
PreviousData = PreviousData & ControlChars.NewLine & CheckHypen<br />
End If<br />
End If<br />
End While<br />
oRead.Close()<br />
End If<br />
<br />
oWrite = oFile.CreateText(FilePath)<br />
<br />
If PreviousData = "" Then<br />
PreviousData = data<br />
oWrite.WriteLine(PreviousData)<br />
Else<br />
PreviousData = PreviousData & ControlChars.NewLine & data<br />
oWrite.WriteLine(PreviousData)<br />
End If<br />
<br />
oWrite.Close()<br />
end sub<br />
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Thanks.
For your rply.I tried it.
Rahul
|
|
|
|
|
Hi,
try:
<br />
Dim TextFile As StreamWriter<br />
TextFile = File.AppendText(sFileName)<br />
and I think this will interest you too:
<br />
Dim fi As New FileInfo(sFileName)<br />
'fi.CreationTime now holds the creation date/time<br />
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thanks.
For your rply.I tried it.
Rahul
|
|
|
|
|
the reason you are getting the " Object reference not set to instance of an object. " error, is because when you are checking if the file exists you are NOT declaring the StreamWriter as NEW
see your code from below.
rahul.net11 wrote: MessageBox.Show("File Found. File was created on: ")
'Dim TextFile As System.IO.TextWriter
Dim TextFile As StreamWriter
TextFile.WriteLine(id)
TextFile.Close()
End If
you need to declare an object as new / make sure the object exists before attempting to use it.
you should have the following sort of thing
Dim TextFile As New StreamWriter(" your file path or stream path here ")
regards.
<--- my signature --->
<font color="blue">Csharp</font> me = (<font color="blue">Csharp</font>)Dynamic_Sysop; <font color="#008000">// My Signature.</font><br><font color="#008000">$twins</font> = <font color="#008000">me.twins</font>(<font color="#800080">"Taylor"</font> , <font color="#800080">"Delta"</font>); <font color="#C0C0C0">// My twin daughters.</font><br>echo <font color="#008000">$twins</font>;
|
|
|
|
|
Asking the same question multiple times in the same day is called "spamming". It's considered very rude.
|
|
|
|
|
hi,
I am using vb.net 2005 with the report viewer control and the built-in
reports (NOT CRYSTAL REPORTS). The report viewer fills a regular form,
which when opened grabs the data for the report (based on certain parameters)
The reports themselves are RDLC files.
following code properly display the preview of my report
Private Sub ShowReport(ByVal Id As Long)<br />
Dim mdIns As New mdGlobal<br />
Dim str As String<br />
Dim AwiCashFlowDataSet As New DataSet<br />
str = "SELECT * FROM Analysis where c_id=" & Id<br />
CashFlowDataSet = mdIns.GetResultFromQuery(str) 'retun dataset with data<br />
CashFlowDataSet.Tables(0).TableName = "ReturnOnCash"<br />
<br />
Dim RDS As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource<br />
ReturnOnCashBindingSource.DataSource = CashFlowDataSet<br />
ReturnOnCashBindingSource.DataMember = "ReturnOnCash"<br />
RDS.Name = "CashFlowDataSet_ReturnOnCash"<br />
RDS.Value = ReturnOnCashBindingSource<br />
Me.ReportViewer1.LocalReport.DataSources.Add(RDS)<br />
If mdChecking.ReportNumber = 1 Then<br />
ReportViewer1.LocalReport.ReportEmbeddedResource = "Analysis.rptReturnOnCash.rdlc"<br />
Else<br />
ReportViewer1.LocalReport.ReportEmbeddedResource = "Analysis.rptCashFlow.rdlc"<br />
End If<br />
<br />
Me.ReportViewer1.RefreshReport()<br />
If IsPrint = False Then<br />
Me.Show()<br />
Else<br />
IsPrint = False<br />
End If<br />
<br />
End Sub
now i want to print the report without preview but i can't. because i dont know
anybody have idea that how can i print the report without preview using reportviewer
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
sum(fld,condfld)
what for this. And can give any example to explain this............
Senthil S
Software Engineer
|
|
|
|
|
The sum of two numbers is what you get when you add them. Given this snippet, bereft of all context, it's hard to say more.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Senthil S wrote: sum(fld,condfld)
This will give you a sum of fld for each condfld - without this second parameter, you will get a sum of fld for all the records in the report.
For example, if you have created a group section called Name, and would like to print a sum of fld for each Name, you need to put in a formula at the group section saying sum(fld,Name).
Hope this helps.
|
|
|
|
|
Hi
I am developing an applicaion in which i am retriving mail from server
using pop3 protocol and indy Liabery.Now i want to retrieve only unread
mails from server.How can in detect which mail is read and which mail is
unread.
Thanks.
Rahul
|
|
|
|
|
I have a windows application fetching images from windows xp machine which to client machine enabling them to view images.
The problem is that windows xp machine which we are using as images hosting server allows only 10 connections at a time and so, only 10 clients can see images.
what to do to override or get rid of this. Can virtual os serve the purpose well???
Thanks,
|
|
|
|
|
If you're running a client-server architecture, then actually put a server at the back end. It doesn't need to be rackable, server-class hardware, but definitely put a server OS on it. Windows 2003 Server will get rid of your connection limit.
|
|
|
|
|
Jwalant Natvarlal Soneji wrote: what to do to override or get rid of this.
Nothing. It's the licensing limits of the workstation operating systems, like NT 4 Workstation, 2000 Professional, XP. In order to increase this limit, you have to use a Server version of Windows, like Windows Server 2003.
|
|
|
|