apc initial implementation
[henge/webcc.git] / html / js / auth.js
1 /*!@file
2 \brief Authorization Handling
3 \details Upon user submission of id/password, hashes password and
4 saves result in a file on VFS using hashing algorithm prov ided by wolfcrypt, a subsystem of wolfSSL
5 \author JEL
6 \date 2016
7 -----------------------------------------------------------------------------*/
8 /* On button press, send password to C runtime environment */
9 function userLogin()
10 {
11 var password = document.getElementById("password").value;
12 /* Virtual Filesystem is of type IDBFS and has been setup in preRun in Module via JVM runtime environment*/
13 Module.execute(_auth_encrypt, password);
14
15 };
16
17 document.getElementById("login").addEventListener("click", userLogin, false);