¿ Alguien sabe en qué nos puede concernir el RGPD ?
http://www.agpd.es/portalwebAGPD/temas/ ... -idphp.php
//-------------------------------------------------------------------------//
FUNCTION Main()
local aStruct := { ;
{ "Name", "C", 20, 0 }, ;
{ "Age", "N", 3, 0 }, ;
{ "Boy", "L", 1, 0 }, ;
{ "Birth", "D", 8, 0 } ;
}
request dbfcdx
rddsetdefault("DBFCDX")
SELECT 0
use dbcrypt
dbcrypt->( dbappend() )
dbcrypt->name := "Fred"
dbcrypt->age := 20
dbcrypt->boy := .t.
dbcrypt->birth := date() - (20 * 365)
/*
? "After create, ", dbcrypt->name, dbcrypt->age, dbcrypt->boy, dbcrypt->birth )
? "DBI_ENCRYPT - barneyrubble", dbcrypt->( dbinfo( DBI_ENCRYPT, "barneyrubble" ) ) )
? "DBI_ISENCRYPTED", dbcrypt->( dbinfo( DBI_ISENCRYPTED ) ) )
*/
CLOSE dbcrypt
RETURN NIL
//------------------------
Func ENCRYPT( TO_DO )
LOCAL PADBACK := LEN(TO_DO), DONE := " ", QAZ
TO_DO := ALLTRIM(TO_DO)
FOR QAZ = LEN(TO_DO) TO 1 STEP -1
DONE := DONE + CHR(ASC(SUBSTR(TO_DO, QAZ, 1)) + 104)
NEXT
RETURN(FILL_OUT(DONE, PADBACK))
//--------------------
Func DENCRYPT( TO_DO )
LOCAL PADBACK := LEN(TO_DO), DONE := " ", QAZ
TO_DO := ALLTRIM(TO_DO)
FOR QAZ = LEN(TO_DO) TO 1 STEP -1
DONE := DONE + CHR(ASC(SUBSTR(TO_DO, QAZ, 1)) - 104)
NEXT
RETURN(FILL_OUT(DONE, PADBACK))
//----------------------
Func FILL_OUT( FILL_A, FILL_B )
IF PCOUNT() = 1
FILL_B := 80
ELSE
IF TYPE("FILL_B") = "C"
FILL_B := val(Fill_B) //VAL(B)
ENDIF
FILL_B := IIF(FILL_B <= 1, 80, FILL_B)
ENDIF
IF FILL_B <= LEN(FILL_A)
RETURN(FILL_A)
ENDIF
RETURN(FILL_A + SPACE(FILL_B - LEN(FILL_A)))
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 54 guests