Am 15.11.2015 06:31 schrieb "Gabriele Cappelletto" <
[email protected]>:
>
>
>
> Il 14/11/2015 18:11, Graeme Geldenhuys ha scritto:
> > On 2015-11-14 09:44, Gabriele Cappelletto wrote:
> >> the .net DESCryptoServiceProvider.
> > Please show how the data was encrypted... The exact code snippet would
> > be useful. I could then show you how to use DCPCrypt with the same
> > settings to decrypt it.
> >
> > Without knowing how it was encrypted, there is no way anybody can show
> > you code on how to decrypt it.
> >
> > Regards,
> >   - Graeme -
> > Ok thanks. We start from the opposite. cryptographer a string with
vb.net with the following code, what's the code to decrypt it with DCPCrypt?
>
> Ok thanks. We start from the opposite. cryptographer a string with
> vb.net with the following code, what's the code to decrypt it with
DCPCrypt?
>
>         Dim Key() As Byte = {}
>         Dim IV() As Byte = {1, 2, 3, 4, 5, 6, 7, 8}
>
>         Dim KeyStr As String = "cicciob1"
>         Dim vector As String = "12345678"
>         Dim inputByteArray(TextBox3.Text.Length) As Byte
>         Dim des As New DESCryptoServiceProvider
>         'des.Mode = CipherMode.CBC
>         'des.Padding = PaddingMode.Zeros
>         Key = System.Text.Encoding.UTF8.GetBytes(KeyStr)
>         inputByteArray = Encoding.UTF8.GetBytes(TextBox3.Text)
>
>         Dim ms As New MemoryStream
>         Dim cs As New CryptoStream(ms, des.CreateEncryptor(Key, IV),
> CryptoStreamMode.Write)
>         cs.Write(inputByteArray, 0, inputByteArray.Length)
>         cs.FlushFinalBlock()
>
>         TextBox4.Text = Convert.ToBase64String(ms.ToArray)

What did you try in the Pascal side (code please)? Did you decode the
Base64 stream before passing the data to the decryption?

Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to