Jump to content

Letter by Letter Comparison


Recommended Posts

I understand this is sort of a silly to some even a stupid question I was wondering how would you do a letter by letter comparison. If you were making a password program.

Like you're checking if the password input by the user equals a constant in your code? You can use the "add" primative - it's polymorphic (which means it can adapt to different datatypes, including strings).

Link to comment

Hi all

I understand this is sort of a silly to some even a stupid question I was wondering how would you do a letter by letter comparison. If you were making a

password program.

Thank you.

  • Use String Length to determine the number of letters in each password.
  • Then use String Subset inside of a For Loop to extract each letter from each password.
  • Then use Equal? to compare them. You can use the To Lower Case to make your comparison case independent, but you normally don't want that with passwords.

Link to comment

From a security point, it is very bad to compare the actual passwords.

Take an MD5 checksum of the (valid) password and compare this with the MD5 checksum of the entered password.

By storing the checksum you have an authentication method that does not store the actual password.

This is for instance done at the CR Class Object.

What is the reason to compare the passwords letter by letter?

Ton

Link to comment

Add a Value change event for your string control. In this event compare the control value with the stored constant using the equal to operator.

You would also be required to right click on the string control and select 'Update while typing'. This ensures that the value change event would fire every time you make a change in the string control

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.