🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #553

Re: Criptaggio stringa

#553
From: DB
Date: Sun, 27 Nov 2005 18:02
40 lines
2135 bytes
"ansris" <ansrisREMOVE_THIS@hotmail.it> a �crit dans le message de news: 
gnajo1djcrmud57bi62srqq8i7gl6hpo6k@4ax.com...
>
> Salve, volevo chiedervi se avete qualche funzione di criptaggio e
> decriptaggio stringhe: dovrei inserire delle stringhe nel registro di
> configurazione. Ho cercato su google ma tutti gli esempi che ho tovato
> utilizzavano classi particolari o erano troppo complessi. Grazie in
> anticipo a chi vorr� aiutarmi!
>
Ciao
prova con questo l'ho fatto qualche anno fa. :

Public Function Crypt_Text(s As String) As String
Dim i As Long
Dim r As String
    If s = "" Then
        Crypt_Text = ""
        Exit Function
    End If
    For i = 1 To Len(s)
        r = Chr((Asc(mId(s, i, 1)) + (2 ^ 7)))
        Crypt_Text = Crypt_Text & r
    Next
End Function
'*****************************************************
Public Function deCrypt_Text(s As String) As String
Dim i As Long
Dim r As String
    If s = "" Then
        deCrypt_Text = ""
        Exit Function
    End If
    For i = 1 To Len(s)
        r = Chr((Asc(mId(s, i, 1)) - (2 ^ 7)))
        deCrypt_Text = deCrypt_Text & r
    Next
End Function

semplice ma funzionante. 
Technical Details
Message-ID: <dmcsma$lvu$1@aphrodite.grec.isp.9tel.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!proxad.net!gaoland.net!grec.isp.9tel.net!not-for-mail
References: <gnajo1djcrmud57bi62srqq8i7gl6hpo6k@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,4c79578138ace335
X-Google-Attributes: gidf94ee,public
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!proxad.net!gaoland.net!grec.isp.9tel.net!not-for-mail
From: "DB" <db@wanadoo.fr>
Newsgroups: free.it.visual-basic
Subject: Re: Criptaggio stringa
Date: Sun, 27 Nov 2005 19:02:47 +0100
Organization: 9Telecom
Lines: 42
Message-ID: <dmcsma$lvu$1@aphrodite.grec.isp.9tel.net>
References: <gnajo1djcrmud57bi62srqq8i7gl6hpo6k@4ax.com>
NNTP-Posting-Host: 221.30.102-84.rev.gaoland.net
X-Trace: aphrodite.grec.isp.9tel.net 1133114890 22526 84.102.30.221 (27 Nov 2005 18:08:10 GMT)
X-Complaints-To: abuse@9online.fr
NNTP-Posting-Date: Sun, 27 Nov 2005 18:08:10 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original