AES - Login algorithm


#1

Hi.

I want to create a login system, not a different one.
How would you not have a sample code created through a security algorithm?

Please help me.


#2

A login system – what kind, for what kind of sketch?

  1. p5.js?
  2. Processing(Java), with passwords stored in the sketch?
  3. Processing(Java), with passwords stored on the local computer?
  4. Processing(Java), with passwords stored on a remote server?

You may be interested in:


#3

@jeremydouglass

Thank you for your interest.

Processing (Java), with passwords stored on the local computer.
I want to import it from a .csv or .json file and process it. I do not know how to do algorithm encryption.


#4

only have a MD5 password in a file
and use javax swing windows for the operator input
the password version is tricky…

http://kll.engineering-news.org/kllfusion01/articles.php?article_id=154#here16

incl a 2D and a 3D show framework

the focus on this exercise was to create a code what even run
if the data path / settings file does not yet exist! so it is created…
so a code copy without ZIP would be possible.
but as it uses 4 TABs ( .pde ) that part is secondary.


#5

@kll
HELLO, Thank you very much for your reply.

I saw your source program well.
What is this algorithm?


#6

https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html

i used the MD5…

//_____________________________________________________
String get_hash(String originalpw) {
  try {
    MessageDigest md = MessageDigest.getInstance("MD5");
    md.update(originalpw.getBytes());
    byte[] digest = md.digest();
    StringBuilder sb = new StringBuilder(32);
    for (byte b : digest)   sb.append(String.format("%02x", b & 0xff));
    return sb.toString();
  } 
  catch (java.security.NoSuchAlgorithmException e) {
    return null;
  }
}

not remember where i found that.
possibly read https://www.baeldung.com/java-md5
anyhow, my settings file is a readable text file in the data/ subdir.
so a password in plain text would not do much good.

many web ( like CMS ) login use MD5, as it is not that secure some do a MD5(MD5)

but in my test it is just to differentiate between a app user and a app admin ( what can save layout changes ) ( and not multi user… )

anyhow the challenge is not the password ( encrypted storage )
it is the password input field ( and that has in my version bugs )

so why you not check out the G4P password thing
http://www.lagers.org.uk/g4p/ref/classg4p__controls_1_1_g_password.html
like in example G4P/G4P_EditTextControls