1. luis avilan
  2. PowerBuilder
  3. Thursday, 26 March 2020 22:38 PM UTC
 
buenas Tardes
 
Al comprimir con el objecto CompressorObject y pasarle un password encriptado me devuelve
-2 -- The password entered is ilegal.
 
 
Este es el codigo utlizado
 
string ls_source, ls_target,ls_clave
Blob lblb_data
Blob lblb_key
Blob lblb_iv
Blob lblb_encrypt
Blob lblb_decrypt
string ls_data
CrypterObject Inv_CrypterObject
Inv_CrypterObject = CREATE  CrypterObject

debugbreak()
//// tomamos el valor a encriptar y lo pasamos a blob
ls_data = 'Test AES' //sle_1.text
lblb_data = Blob(ls_data, EncodingANSI!)
//
//// declaramos nuestra llave privada y publica
lblb_key = Blob("prue Key12345678", EncodingANSI!)
//// Encrypt data using AES
lblb_encrypt = Inv_CrypterObject.SymmetricEncrypt(AES!, lblb_data, lblb_key)
///////////////////////////
ls_clave =string(lblb_encrypt)
ls_source = "C:\Users\luisavilan\Documents\readme.txt"
ls_target = "C:\Users\luisavilan\Documents\comprimir"
lnv_compress = create CompressorObject
lnv_compress.password = ls_clave
li_return = lnv_compress.Compress(ls_source,ls_target, ArchiveFormatZIP!)
messagebox("",li_return)
 
-2 -- The password entered is ilegal.
luis avilan Accepted Answer Pending Moderation
  1. Friday, 27 March 2020 00:19 AM UTC
  2. PowerBuilder
  3. # 1

Saludos Govinda 

 

Me da el mismo resultado

 

CrypterObject Inv_CrypterObject
Inv_CrypterObject = CREATE  CrypterObject

debugbreak()
//// tomamos el valor a encriptar y lo pasamos a blob
ls_data = 'Test AES' //sle_1.text
lblb_data = Blob(ls_data, EncodingUTF8!)
//
//// declaramos nuestra llave privada y publica
lblb_key = Blob("prue Key12345678", EncodingUTF8!)
//// Encrypt data using AES
lblb_encrypt = Inv_CrypterObject.SymmetricEncrypt(AES!, lblb_data, lblb_key)
///////////////////////////
ls_clave =string(lblb_encrypt,EncodingUTF8!)
ls_source = "C:\Users\luisavilan\Documents\readme.txt"
ls_target = "C:\Users\luisavilan\Documents\comprimir"
lnv_compress = create CompressorObject
lnv_compress.password = ls_clave
li_return = lnv_compress.Compress(ls_source,ls_target, ArchiveFormatZIP!)
messagebox("",li_return)
Comment
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 March 2020 00:13 AM UTC
  2. PowerBuilder
  3. # 2

Luis:

 

Intenta cambiar todo por EncodingUTF8!

 

Saludos,

Comment
There are no comments made yet.
luis avilan Accepted Answer Pending Moderation
  1. Thursday, 26 March 2020 23:23 PM UTC
  2. PowerBuilder
  3. # 3

Buenas Tardes Govinda 

 

Igual yo lo tenia así y nada

Comment
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Thursday, 26 March 2020 23:15 PM UTC
  2. PowerBuilder
  3. # 4

Hola Luis,

 

Intenta cambiar la siguiente línea de código:

 

ls_clave =string(lblb_encrypt)

 

por

 

ls_clave =string(lblb_encrypt, EncodingANSI!)

 

 

Saludos,

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.