- Code: Select all Expand view
- FUNCTION EncryptString( cInput, cKey )
LOCAL cEncrypted := "", nKeyLen := LEN( cKey )
LOCAL i, nChar
FOR i := 1 TO LEN( cInput )
nChar := ASC( SUBSTR( cInput, i, 1 ) ) $XOR$ ASC( SUBSTR( cKey, ( ( i - 1 ) % nKeyLen ) + 1, 1 ) )
cEncrypted += CHR( nChar )
NEXT
RETURN cEncrypted
FUNCTION DecryptString( cEncrypted, cKey )
RETURN EncryptString( cEncrypted, cKey )
STATIC FUNCTION XorChar( nChar1, nChar2 )
RETURN BitXOr( nChar1, nChar2 )
tampoco funciona en Bcc77
- Code: Select all Expand view
- cInput:= "dario5402()"
cKey:= "askfdhndsc+64905483(^#)"
FUNCTION EncryptString( cInput, cKey )
LOCAL cEncrypted := "", nKeyLen := LEN( cKey )
LOCAL i, nChar
FOR i := 1 TO LEN( cInput )
nChar := ASC( SUBSTR( cInput, i, 1 ) ) $XOR$ ASC( SUBSTR( cKey, ( ( i - 1 ) % nKeyLen ) + 1, 1 ) )
cEncrypted += CHR( nChar )
NEXT
RETURN cEncrypted
FUNCTION DecryptString( cEncrypted, cKey )
RETURN EncryptString( cEncrypted, cKey )
STATIC FUNCTION XorChar( nChar1, nChar2 )
RETURN BitXOr( nChar1, nChar2 )
Saludos y gracias
Dario Fernandez