FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 25
→
WX - CryptStandart e UncryptStandart
WX - CryptStandart e UncryptStandart
Iniciado por BOLLER, 16,mar. 2018 14:16 - 1 respuesta
Conéctese…
BOLLER
#1
Miembro registrado
3.657 mensajes
Popularité : +175 (223 votes)
Publicado el 16,marzo 2018 - 14:16
C
ryptStandart
e UncryptStandart
//Exemplo para Criptografar
s
Message
is
Buffer
=
"Message to encrypt"
buf
Key
is
Buffer
=
HashString
(
HA_CKSUM_64
,
"password"
)
buf
Encrypt
is
Buffer
=
CryptStandard
(
s
Message
,
buf
Key
,
cryptDES
)
Info
(
buf
Encrypt
)
// Exemplo para Decriptografar
buf
Key
is
Buffer
=
HashString
(
HA_CKSUM_64
,
"password"
)
s
Result
is
Buffer
=
UncryptStandard
(
buf
Encrypt
,
buf
Key
,
cryptDES
)
Info
(
s
Result
)
//E no Windev Mobile
//Criptografia
B_senha
is
Buffer
=
HashString
(
HA_HMAC_MD5_128
,
"bob-esponja"
)
B_resultado_Criptografado
is
Buffer
=
CryptStandard
(
buf
_conteudo_sig
,
B_senha
,
cryptAES128
)
Info
(
B_resultado_Criptografado
)
//Descriptografia
B_senha
is
Buffer
=
HashString
(
HA_HMAC_MD5_128
,
"bob-esponja"
)
B_resultado_Descriptografado
is
Buffer
=
UncryptStandard
(
buf
_conteudo_sig
,
B_senha
,
cryptAES128
)
Info
(
B_resultado_Descriptografado
)
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Informar
0
0
ARV
#2
Miembro registrado
498 mensajes
Popularité : +8 (8 votes)
Publicado el 22,marzo 2018 - 21:08
Hi
I use this function but it doesn't work pefectly between Android and PC for some reason.
Have you had that issue too?
I'm using windev mobile 20 and Windev 20 my text it's an Unicode String for both sides but it only uncrypt the first letter the rest is lost
heres my code:
//Encrypt in Android
pass
is UNICODE string
=
"Password"
buf
KEY
is
Buffer
=
HashString
(
HA_MD5_128
,
pass
)
s
Messa
is UNICODE string
=
E
DT_Text
buf
Encrypt
is
Buffer
=
CryptStandard
(
s
Messa
,
buf
KEY
,
cryptAES128
)
TableDB.Pa
=
buf
Encrypt
HAdd
(
TableDB
)
Info
(
"Done"
)
//Uncrypt on PC
HReadFirst
(
TableDB
,
ID
)
pass
is UNICODE string
=
"Password"
bufkey
is
Buffer
=
HashString
(
HA_MD5_128
,
pass
)
buf
SResult2
is
Buffer
=
UncryptStandard
(
TablaErrores.Pa
,
BufKey
,
cryptAES128
)
E
DT_Uncrypt
=
buf
SResult2
IF
buf
SResult2
=
""
THEN
Info
(
ErrorInfo
(
errFullDetails
)
)
END
Informar
0
0
→ Volver a WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto