Re: DES and UUEncoded
From: Alain Hogue (alain_at_aza.qc.ca)
Date: 04/01/04
- Previous message: Shawn Farkas: "RE: problem verifying XML signature"
- Next in thread: Shawn Farkas: "Re: DES and UUEncoded"
- Reply: Shawn Farkas: "Re: DES and UUEncoded"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 31 Mar 2004 20:55:48 -0500
Thanks for the info!
I already tried that, but the problem I have is the DES.EXE program I am
using only use a key and not an IV. o I donbt know what to use for an IV?
Anything I put in there does not work with that external program.
Alain
""Shawn Farkas"" <shawnfa@online.microsoft.com> a écrit dans le message de
news:gNi43mfFEHA.3096@cpmsftngxa06.phx.gbl...
> Hi Alain,
>
> There's no built in support for uudecoding (although if you search google,
I'm sure you'll either find some sample code, or a description of
> the algorithm which wouldn't be difficult to implement yourself). Once
you've decoded it, using DES encryption is easy. First, you'll need to add
the
> System.Security.Cryptography namespace to the namespaces your code
references. Once you've done that, you can create an instance of the
> DESCryptoServiceProvider class, and setup your key and IV. CBC is the
default mode of the DESCryptoServiceProvider, so you won't need to
> change that.
> Next you create a MemoryStream that will hold the output of your
decryption. This is a oneliner:
>
> MemoryStream ms = new MemoryStream();
>
> Then you hook up a CryptoStream to that memory stream, and set it to
decrypt mode:
>
> CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(),
CryptoStreamMode.Write);
>
> After this, you write your encrypted data into the crypto stream. Once
you've finished writing the last bit of data, close the stream. Your
> decrypted output will be avaliable in the memory stream. The easiest way
to get at it is:
>
> byte[] decrypted = ms.ToArray();
>
> That should be enough to get you started, but if you need more help feel
free to post back here.
>
> -Shawn
> http://blogs.msdn.com/shawnfa
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
> originated.
> --------------------
> >From: "Alain Hogue" <alain@aza.qc.ca>
> >Subject: DES and UUEncoded
> >Date: Sun, 28 Mar 2004 04:43:46 -0500
> >Lines: 16
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >Message-ID: <uArwqkKFEHA.2308@tk2msftngp13.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.security
> >NNTP-Posting-Host: dns1.aza.qc.ca 199.243.87.251
> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.security:5567
> >X-Tomcat-NG: microsoft.public.dotnet.security
> >
> >Hi !
> >
> >I am receiving files from a third party (Bloomberg) and the file is
> >encrypted using DES with cbc mode and then uuencoded.
> >
> >How can I uudecode the file AND decrypt it in dotNET using VB Net (or C#)
?
> >I am a beginner in the cryptography field, so some examples would be
> >great!...
> >
> >Thanks alot for your help
> >
> >Alain H
> >
> >
> >
> >
> >
>
>
- Previous message: Shawn Farkas: "RE: problem verifying XML signature"
- Next in thread: Shawn Farkas: "Re: DES and UUEncoded"
- Reply: Shawn Farkas: "Re: DES and UUEncoded"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|