changeable passwords

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

herbwords
Posts: 70
Joined: Sat Dec 01, 2007 2:59 am

changeable passwords

Post by herbwords » Thu Nov 29, 2012 9:35 pm

I'm trying to use bullets in place of the real password for privacy. The ask password option in the dictionary seems fixed and I need to have the capability of allowing users to change passwords at anytime in the preferences of my program. This is what I have right now. It works fine but anyone can see what your typing. Any suggestions?

on mouseUp
Answer "Would you like to set the password or set expire dates?" with "Password" or "Expire Dates"
if it is "Password" then
doPass
exit mouseUp
end if
if it is "Expire Dates" then
doExpire
end if
end mouseUp

on doPass
Ask "What is the password?"
if it = fld "password" then
Ask "What password would you like to use? Make sure you store a copy this word in a safe place!"
put it into fld "password"
else
Answer "That's not correct!"
exit doPass
end if
end doPass


Thanks,

Patrick

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: changeable passwords

Post by Klaus » Thu Nov 29, 2012 10:10 pm

Hi Patrick,

you could use the built-in password dialog, no bullets but ******
...
ask password clear "Enter password:"
if it =...
...
Or am I misunderstanding you?


Best

Klaus

herbwords
Posts: 70
Joined: Sat Dec 01, 2007 2:59 am

Re: changeable passwords

Post by herbwords » Fri Nov 30, 2012 12:34 am

I thought it would be more complicated since I wanted to store the password I thought it would store the stars not the letters. It works thanks Klas

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: changeable passwords

Post by Klaus » Fri Nov 30, 2012 10:56 am

Hi Patrick,
herbwords wrote:...It works thanks Klas
You're welcome, but my name is KLAUS!
I'm german, not dutch :D


Best

Klaus

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Fri Nov 30, 2012 11:55 am

Hi. I made a password field, which lets you set a property to store an encrypted password and shows bullets when the user enters it. It is available after making a donation here.

Klas isn't a Dutch name. Klaus is usually written as Claus and the other variant would be Klaas.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: changeable passwords

Post by Klaus » Fri Nov 30, 2012 12:10 pm

Hi Mark,

ah, yes, Klaas with 2 "a", thanks for the correction!
Well, my spoken dutch is much better that my dutch writing, but still quite lousy :D


Best

Klaus

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: changeable passwords

Post by bn » Fri Nov 30, 2012 1:44 pm

Hi Klaus,

how about Sinter-Klaas as your alternative first name? :)

http://en.wikipedia.org/wiki/Sinterklaas

That would be Klaus (Sinterklaas) Major.

Watch out for the 6th of december, will be your busy day in Germany.

Kind regards
Bernd

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: changeable passwords

Post by Klaus » Fri Nov 30, 2012 2:48 pm

Sehe ich etwa aus wie der holländische Weihnachtsmann (Nikolaus/Sinterklaas IST das holländische Weihnachten!))???
Ts, ts, ts, Frechheit! Bernd, komm Du mir mal nach Hause! 8)

Sorry, cannot really translate this personal german joke :D

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Fri Nov 30, 2012 3:27 pm

Nein, nein. Sinterklaas ist gar kein Weihnachtsmann! Der Weihnachtsmann ist der jüngere, oft betrunkene, sich immer vollfressende neffe des Sinterklaas. Sinterklaas ist ein Heiliger, der Weihnachtsmann nicht.

Gruß,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: changeable passwords

Post by Klaus » Fri Nov 30, 2012 3:31 pm

Ja, ich weiß, ich meinte auch nur, daß in Hollnad die Bedeutung von Sinterklaas so wichtig ist,
wie in Deutschland die von Weihnachten. :D

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Fri Nov 30, 2012 3:34 pm

Das stimmt wohl.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Mon Dec 17, 2012 3:43 pm

I am new to LiveCode. I was looking for a code for my Desktop application.
I read this but I couldn't figure out how to implement it in my App. I want to store 3 passwords. the first first will be the super Admin password, the second one will be a regular administrator, the third one will be a student password.
Depending of which one you enter you will be accessing a different screen.
I will appreciate any help.
Thank you!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Mon Dec 17, 2012 3:58 pm

Hi,

That's an easy one. Suppose you have 3 different passwords, "student", "admin" and "owner", then you can encrypt the passwords with mcEncrypt: zmdJF|, 9/d&+ and L[Wwg.

Use ask password to ask the user for the password. The first card could be a black screen or a nice photo. Cards 2, 3 and 4 are the respective screens for each type of user.

Code: Select all

on openCard
  ask password "Please, enter your password"
  if it is "zmdJF|" then
    go cd 2
  else if it is "9/d&+" then
    go cd 3
  else if it is "L[Wwg" then
    go cd 4
  else
    beep
    answer "The password is wrong"
  end if
end openCard
There are safer ways to do this, but this is a good solution for a beginning LiveCode user.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Mon Dec 17, 2012 8:04 pm

Thank you, this is exactly what I was looking for. But with the encryption is there a way to change it to what I want any time?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Mon Dec 17, 2012 8:45 pm

Hi,

Change it how, to what, at what times? Sorry, but those are too many questions and too little info. What do you want exactly?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply