[Gambas-user] New gb.crypt.openssl component

Ian Haywood ihaywood at ...1979...
Sat May 25 13:07:34 CEST 2013


On Tue, May 21, 2013 at 7:58 AM, Tobias Boege <taboege at ...626...> wrote:
> Hi folks,
>
> seems to be the day of new components... I just committed a gb.crypt.openssl
> component to wrap the cryptographic functions in OpenSSL's libcrypto. The
> idea came actually from Sebastian in conjunction with his gambas-online
> project. But maybe it's useful to someone else.

This is useful, thanks

In your example code you stated there is no automatic way to convert
strings to hex. It is possible to do using a loop and the Hex$
function, like so:

Public Function String2Hex(s As String) As String

  Dim ret As String = ""
  Dim i As Integer

  For i = 1 To Len(s)
    ret &= Hex$(Asc(s, i), 2)
  Next
  Return ret

End


Cheers,


Ian




More information about the User mailing list