تبدیل VB6 به ActionScript....؟

omidak

Active Member
سلام:
كسي بلده اينو تبديل كنه به ActionScript؟
این کد مال VisualBasic6 هستش...: :wink:
کد:
Public Function EncryptPass(InQ As String, PasswordStr As String, EnOrDe As Boolean) As String
    'EnOrDe True = Encrypt
    'EnOrDe False = Decrypt
    Dim tmpInt1, tmpInt2 As Long
    For x = 1 To Len(PasswordStr)
        tmpInt1 = tmpInt1 + Asc(Mid(PasswordStr, x, 1))
    Next x
    For x = 1 To Len(InQ)
        If EnOrDe = True Then
            tmpInt2 = Asc(Mid(InQ, x, 1)) + tmpInt1 + x
            Do Until tmpInt2 <= 255
                tmpInt2 = tmpInt2 - 255
            Loop
        Else
            tmpInt2 = Asc(Mid(InQ, x, 1)) - tmpInt1 - x
            Do Until tmpInt2 > 0
                tmpInt2 = tmpInt2 + 255
            Loop
        End If
        EncryptPass = EncryptPass & ChrW(tmpInt2)
    Next x
End Function
پیشا پیش از کمکهاتون ممنونم :oops: :wink:
 

جدیدترین ارسال ها

بالا