[Gambas-user] Usage of openssl.EncryptSalted
Benoit Minisini
benoit.minisini at gambas-basic.org
Wed May 31 16:38:22 CEST 2023
Le 31/05/2023 à 16:25, Marco Ancillotti a écrit :
> Il 31/05/23 12:36, Benoit Minisini ha scritto:
>>
>> 'gb.openssl' method arguments are bytes. Command-line 'openssl'
>> arguments are hexadecimal digits. I guess this is the reason why you
>> don't get the same results.
>>
> Hi Benoit ,
>
> I've try converting string to bytes with
>
> Bpwd = Byte[].FromString(pwd)
>
> But I get a:
>
> MMain.?.0: #6: Type mismatch: wanted String, got Byte[] instead
>
> Also on that page:
>
> https://gambas-buch.de/dwen/doku.php?id=k28:k28.3:start
>
> it claim that argument are strings:
>
> Encrypt ( Plain As String [ , Key As String, InitVector As String ] )
>
>
> EncryptSalted ( Plain As String, Password As String [ , Salt As String ] )
>
>
> I'm loosing somethink ?
>
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
I told you that 'openssl' command-line tools takes hexadecimal digits as
argument. You must convert them to bytes in Gambas. And these bytes are
stored in a string, not a byte array.
Regards,
--
Benoît Minisini.
More information about the User
mailing list