Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.visual-basic > #18819
| X-Received | by 10.25.169.76 with SMTP id s73mr1076985lfe.5.1466347432247; Sun, 19 Jun 2016 07:43:52 -0700 (PDT) |
|---|---|
| X-Received | by 10.36.1.15 with SMTP id 15mr179682itk.6.1466347432120; Sun, 19 Jun 2016 07:43:52 -0700 (PDT) |
| Path | csiph.com!feeder.erje.net!1.us.feeder.erje.net!goblin1!goblin.stu.neva.ru!w10no3170804lbo.0!news-out.google.com!di11ni33560lbb.1!nntp.google.com!oe3no4971658lbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | it.comp.lang.visual-basic |
| Date | Sun, 19 Jun 2016 07:43:51 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=93.44.85.193; posting-account=4c3DWgoAAADQcJJevo-GlQ6CVmV90H2x |
| NNTP-Posting-Host | 93.44.85.193 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <971e36a2-a161-4669-b630-9137f3e9c699@googlegroups.com> (permalink) |
| Subject | Quesito crittatura dati |
| From | Antologiko <antologiko@gmail.com> |
| Injection-Date | Sun, 19 Jun 2016 14:43:52 +0000 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Xref | csiph.com it.comp.lang.visual-basic:18819 |
Show key headers only | View raw
Buonasera a tutti.
Ho una matrice di 256 byte da crittare.
Utilizzo la classe RijndaelManaged impostando la chiave a 256 bit e la dimensione dei blocchi a 256 bit.
Crittando la mia matrice di 256 byte, come risultato ottengo una matrice di dati a 288 byte (ovvero 256 byte + 32 byte, cioè 256 byte + 256 bit).
La domanda è: dopo la crittatura, non dovrei ottenere una matrice delle stesse dimensioni della matrice di dati iniziale (ovvero sempre 256 byte invece che 288)?
Il codice usato è, in sunto, il seguente.
Dim Data As Byte() = ... 'Data è una matrice di 256 byte.
Dim RijndaelAlgorithm As New RijndaelManaged
With RijndaelAlgorithm
.KeySize = 256
.BlockSize = 256
.Mode = Security.Cryptography.CipherMode.CBC
.Key = ... 'Key è anch'essa una matrice di 256 byte.
End With
Dim IV As Byte() = RijndaelAlgorithm.GenerateIV()
Dim EncryptedData As Byte()
Using Encryptor As ICryptoTransform = RijndaelAlgorithm.CreateEncryptor(RijndaelAlgorithm.Key, IV)
EncryptedData = Encryptor.TransformFinalBlock(Data, 0, Data.Length)
End Using
Back to it.comp.lang.visual-basic | Previous | Next — Next in thread | Find similar
Quesito crittatura dati Antologiko <antologiko@gmail.com> - 2016-06-19 07:43 -0700
Re: Quesito crittatura dati Antologiko <antologiko@gmail.com> - 2016-06-19 10:20 -0700
Re: Quesito crittatura dati Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2016-06-19 19:23 +0200
Re: Quesito crittatura dati Antologiko <antologiko@gmail.com> - 2016-06-19 10:25 -0700
csiph-web