Jump to content
Fórum Script Brasil
  • 0

Código De Criptografia


@line
 Share

Question

3 answers to this question

Recommended Posts

  • 0

Tenho este código simples:

Function Criptografia(ByVal StrTexto As String) As String

Dim i

Dim nCar

Dim cCar

ChavePar = 256

ChaveImpar = 255

If ChavePar < 1 Or ChavePar > 255 Then ChavePar = 25

If ChaveImpar < 1 Or ChaveImpar > 255 Then ChaveImpar = 33

cCar = ""

For i = 1 To Len(StrTexto)

If i / 2 = Int(i / 2) Then

nCar = Asc(Mid(StrTexto, i, 1)) Xor ChavePar

Else

nCar = Asc(Mid(StrTexto, i, 1)) Xor ChaveImpar

End If

cCar = cCar + Chr(nCar)

Next

Criptografia = cCar

End Function

para fazer a chamada:

'Cript.

Cript = Criptografia("SuaSenha")

MsgBox Cript

'Des.

DCrip = Criptografia(Cript)

MsgBox DCrip

PS:

A Aline e a @line são a mesma pessoa?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.7k
    • Total Posts
      648.5k
×
×
  • Create New...