DESCryptoServiceProvider

From: Ondrej Sevecek (ondra_at_sevecek_dt_com)
Date: 03/02/05


Date: Wed, 2 Mar 2005 15:24:25 +0100

Hello,

would you please provide me with some simple sample of how to use the
DESCryptoServiceProvider to encrypt a buffer

byte[] buffer;

with key

byte[] key;

I saw some sample using Streams, but is there a simpler method working for
buffers?

O.



Relevant Pages

  • Re: Cryptographic Exception - Bad Data (DESCryptoServiceProvider)
    ... Encrypt the buffer (with an 8 byte DES key) and store the result in the ... the crypto stream is doing something that I do not want it to do ...
    (microsoft.public.dotnet.framework)
  • Re: CryptEncrypt 3DES Encrypted Buffer Size
    ... > I'm using CryptEncrypt to encrypt a buffer that's 16 bytes in length. ... > another hardware implementation that doesn't use the CryptoAPI. ...
    (microsoft.public.platformsdk.security)
  • [PATCH 03/04] Add encryption ops to the keyctl syscall
    ... +asmlinkage long sys_keyctl(int cmd, unsigned long arg2, ... + be encrypted/signed using the key payload. ... + to encrypt or sign the data and to return the result in outputbuf. ... + userspace if the buffer pointer is not NULL. ...
    (Linux-Kernel)
  • Re: how can i encrypt/decrypt binary data?
    ... > that tries to encrypt a serialized integer. ... encrypting the buffer. ... You never close the writing cryptostream. ... it easier to use another "writing" CryptoStream, but a decrypting one, ...
    (microsoft.public.dotnet.framework)
  • Re: alternatives to streamsec ?
    ... Now...you can't pass in a memory stream directly..it is not a buffer, ... Copy the data to be encrypted to this block, encrypt, and read ... These, I believe, are replacement TMemoryStream ...
    (borland.public.delphi.thirdpartytools.general)