|
|
There is a base class names DES for another class DESCryptoServiceProvider,I can use both for DES encyption like this:
DES des = DES.Create();
or
DES des = new DESCryptoServiceProvider();
My book say it is recommended to use first one because it create default cryptography service which it is latest version but second one is a defined way which is not surly latest version. Now I have a problem,I have a web service which has some encryption-decryption and this web service has a VB client and the VB client has its own encryption-decryption. The VB developer do his own part. Is that make change which one I use? Because he will/can not use .NET framework and he have to use cryptograohy API, I don't know the API's and I don't know the equivalent of first one. Also can I be sure if the cryptography's versions are grow the results of DES.Create() will be the same and it will generate the same decrypted value whith the constant KEY?(I mean only algorithm change but not the result) If I wrote myself both parts I could be sure about that but now one part in VB and I'm not sure about that. I hope that my problem is clear for you guys.
Mazy
No sig. available now.
|
|
|
|
|
The whole idea of cryptographic standards - or any standards at all - is that they are the same wherever they are implemented. Crypto algorithms like RSA and DSA are standard. Don't worry about the implementation. So long as the key (i.e., the shared key in symmetric key or private key in asymmetric algorithms) you should have no problems. And again don't worry about the cipher text being different from encrypt and encrypt - the initialization vector is supposed to change in order to randomize the results and make it harder for crypto analysts to crack the key.
Again - these are standards.
Besides, the cryptography in .NET uses the Crypto API for various things.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks Heath.
Mazy
No sig. available now.
|
|
|
|
|
wonderful piece of code, that Crypto API ;)
________________________________________
Gosh, it would be awful pleas'n, to reason out the reason, for things I can't explain.
Then perhaps I'd deserve ya, and be even worthy of ya..
if I only had a brain!
|
|
|
|
|
Hi,
I derived my collection class from CollectionBase. Now if i edit my collection in the CollectionEditor and remove an item from the collection, there is no call to CollectionBase.Remove() method. The Add method is called, but the remove never, why ?
I would like to perform additional custom processes on add, insert and remove.
This has to work on code and with CollectionEditor, but it seems that it behaves different.
Any hints?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
When you override methods, it is your method that is getting called. In your implementation, make sure to call base.Remove in order for the base class's method to be called. You should almost always call base.Method(params) when overriding methods from a base class, unless you have a reason for not doing so (like you don't want the default implementation to be executed, which is pretty common when overriding WndProc ).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi Heath,
thanks for the answer. But it seems like the collection editor always clear's the collection and call Add method for every item. I have no clue why the editor do this, but it works...
thanks...
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
Hi
I need some help in getting a video played in the back ground of my win form where I will add some controls that would display some text and other stuff.
What I did until know is.
Using interop and Com I am able to play the video inside a panel, but here is the problem if I add a control inside the panel ex.
This.controls.add(panel1)
This.panel1.Controls.Add(textcontrol)
When the video loads it is hiding everything in the same control (panel1) but not all the form unless I set the size of panel1 to be as the same size as the form.(I don’t want every thing to be hidden I want the controls to show over the video with an alpha transparency level )
What I did is instead of adding the textcontrol to the panel1 I am adding it to the main form so I am being able to put the text over the video, but I am losing the benefit of having an alpha (transparency) for my text.
I would weolcme any suggestion to solve this and any alternative solution
Simply what I am trying to achieve now is to have a news bar like the one that you can see on CNN by adding text over the video
Thanks for reading this.
Best regards
|
|
|
|
|
I'm not sure about the solution to your exact problem (I'll take a look at this later tonight possibly...it might have to do with how overlays in general work), but I'm curious why you're using interop and COM to use DirectShow functionality?
Have you considered looking at the Managed DirectX stuff and the Microsoft.DirectX.AudioVideoPlayback namespace in particular? It seems like it'd be a lot easier in general than doing COM interop.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
I'm building a custom control and I want it to change borders when a MouseEnter events happens.
a) Can I simply paint the border in the MouseEvent method?
OR
b) Must I set a flag and call Invalidate(), and wire OnPaint to draw the new/old border appropriately?
If a) is ok, then how do I get a graphics instance in the MouseEnter event.
Or, is b) the preferred method to do this?
Thanks,
-Luther
|
|
|
|
|
Because there are several things that can happen while your mouse is moving or resting comfortably in the bounds of your control, it'd probably be best to set a flag (ex: set to true ) and call Invalidate() in the handler for MouseEnter event, and to clear the flag (ex: set to false ) in the handler for the MouseLeave event. Of course, your override for OnPaint (note, this is an override, not an event handler, which are typically wired for other controls - use overrides when possible to override functionality from the base class) should draw the border appropriately depending on the flag.
The first method is possible (see Control.CreateGraphics ) but is too problematic since MouseEnter only fires once. Your border would get painted, sure, but then any successive painting required won't repaint the border.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
The flag method works cleanly - I typically try to avoid saving and polling state like that ... but practically speaking, I assume it makes sense in this stateful, event driven world.
I also appreciate your comment regarding overrides vs handlers. It wasn't concretely clear to me when to use which.
I see that for every child control I add to a parent, I could add a handler. Self-documenting and a bit easier to organize. Whereas, the control's own painting naturally belongs in the override.
Thanks!
-Luther
|
|
|
|
|
How can I run a c# application without .net framework ?
|
|
|
|
|
No. There's a reason .NET applications are said to be managed code: it's managed by the CLR, just like Java is by the JVM, Visual Basic is by the VB runtime, etc.
The .NET Framework MUST be installed to run ANY .NET application (regardless of what language the source code is in, since all compilers produce IL, except the MC++ which - in mixed mode - can embed native code into assemblies).
See the following article for a pretty good view on the subject: http://radio.weblogs.com/0105852/stories/2002/04/21/itsTheRuntimeStupid.html[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Time to bookmark that link .
I think his comment about C# possibly being the new VB is dead on. It's not TOTALLY the consumer's fault in my opinion. MS does a good job at hyping how easy this stuff is, and as a result people jump in head first . That said, there's never a magic bullet that makes programming as easy as writing a Word document.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Hmmm...I saw your reply to my reply, and responded. Now your reply is gone (did you move/delete it?) and my response got lost in some weird void. In any event, check this out if you get bored.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
|
They claim that this will do it.
Remotesoft
Thank You
Bo Hunter
|
|
|
|
|
You Can Use MONO
Works with Linux =)
----
hxxbin
|
|
|
|
|
|
Hi! does anyone know how to insert a progressbar within a listview control? the purpose of the progressbar is to show a graphical representation of a percentage. thanks!
|
|
|
|
|
This has been covered countless times in this forum, including just recently. Please click the "Search Comments" link at the top of this messages box to find relevent messages and to see the complete threads.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I found a nice piece of code from the MSDN that does it. However this note was attached to it:
// PERFORMANCE NOTE:
// For ease of implementation, SecureClientChannelSink can take out some pretty big locks.
// Not a problem for demo purposes, but if this will be used as the basis for any kind of
// production level code, synchronization needs to reviewed and possibly greatly revamped.
Can anyone point me to an optimized piece of code?
|
|
|
|
|
I found a good example of a Secure Remoting Channel on Ingo Rammer's book. www.ingorammer.com[^]
Free your mind...
|
|
|
|