Page 1 of 2

Login form in CSPro

Posted: May 28th, 2013, 6:19 am
by cort1991
Can we create login form in cspro. Is it possible.
regards,
Vasant

Re: Login form in CSPro

Posted: May 28th, 2013, 6:21 pm
by htuser
It's possible to create login page with logic. I already do it. It's very easy.
But the problem, i can't hide and encrypt the password with a hashing algorithm(transform it in "********" in the login page and in salt in the data file)
I'm convicted that Gregory Martin has some solutions to hide the password (by exemple, he can built a function to do it).
Sincerely yours,

Re: Login form in CSPro

Posted: May 29th, 2013, 6:00 pm
by lls
I think that if you distribute your CSPro application in binary (with .enc extention), one should not be able to access the code, so the password would be hidden.

Re: Login form in CSPro

Posted: May 29th, 2013, 7:38 pm
by khurshid.arshad
Use this code

Proc Password

Preproc
Set Attributes($)hidden;

Re: Login form in CSPro

Posted: July 12th, 2013, 6:45 am
by htuser
Dear all,
Thanks for A. and Ils for helps.
To Arshad, i think the hidden must be in the postproc because it's for hide a previously entrered password.

I would like to ask to Gregory if it's possible to have a function or another way to encrypt a value of a item so that this value can't be viewed clearly in the data file (by example, a password of a username).

Thanks in advance

Re: Login form in CSPro

Posted: July 13th, 2013, 12:06 am
by Gregory Martin
The CSPro data file is a text file, as you know, which makes it hard to hide data from human eyes, which can look at the file very easily.

You could come up with your own encryption method and apply it to fields like the password. Any method that you could come up with would be very weak encryption, but if you are only concerned with low-level "threats," it might be sufficient. For example, you could write a function in logic to apply a substitution cipher to the field:

https://en.wikipedia.org/wiki/Substitution_cipher

Re: Login form in CSPro

Posted: July 13th, 2013, 9:41 am
by htuser
Thank you for the help. I think it's not complicated to write a such function. When finalizing it, i will send it to you by email for comments.
Sincerely yours,

Re: Login form in CSPro

Posted: June 10th, 2021, 1:27 pm
by parthsaha
Hi Martin,

I get a sense from the thread, that currently there is no way in CSPRO to show '**********' instead of the password. OR is there a way?

Please help!

Thanks

Parth

Gregory Martin wrote: July 13th, 2013, 12:06 am The CSPro data file is a text file, as you know, which makes it hard to hide data from human eyes, which can look at the file very easily.

You could come up with your own encryption method and apply it to fields like the password. Any method that you could come up with would be very weak encryption, but if you are only concerned with low-level "threats," it might be sufficient. For example, you could write a function in logic to apply a substitution cipher to the field:

https://en.wikipedia.org/wiki/Substitution_cipher

Re: Login form in CSPro

Posted: June 11th, 2021, 9:29 am
by Gregory Martin
There is currently no way to show a field as a password during data entry. If you are using Windows, you can hide the value using the hidden attribute here: https://www.csprousers.org/help/CSPro/s ... ement.html

We'll consider adding a password feature in a future release.

Another option is to use the prompt function to capture a password: https://www.csprousers.org/help/CSPro/p ... ction.html

Re: Login form in CSPro

Posted: June 11th, 2021, 10:07 am
by htuser
Dear parthsaha,
The workaround that i'm using is the prompt function with password argument https://www.csprousers.org/help/CSPro/p ... ction.html

But, if you want a more advanced way, please consider this post: https://stackoverflow.com/questions/955 ... log-prompt
In the latest version, CSPro support Webview/Webview 2 technologies both for Android and Windows devices, so you can embed Javascript/HTML5/CSS more conveniently with your application.
Josh used D3 and other JavaScript libraries as example. It upgraded it for the latest CSPro version. Please see an example: https://github.com/jhandley/cspro-D3-charts
The JavaScript driven part of your application can be opened:
a) In the CAPI part of your Entry Application. It's the part of your application, where the webview is tightly supported;
b) Using view function: https://www.csprousers.org/help/CSPro/v ... ction.html it will open it in an embedded popup window.

In both, you'll have to save the entered password in a text file and read it in CSPro using file.read function. Alasql javascript library
(https://github.com/agershun/alasql) is one of few that i know who will allow you to save locally in text format.

Hope this help you.

@ Greg, as you know, i'm advocating for the support of Javascript in CSPro Logic through the V8 engine. Please support us since
if this is done, many things will be very simple for us. So you'll concentrate yourself on CAWI instead of, natively develop a function for each user request!