1/** 2 * ííì´ì§ ë¡ê·¸ì¸ 3 */ 4 5$(function(){ 6 getsaveid(); 7}); 8 9function formEnter(key) { 10 if (event.keyCode==13){ 11 if( key == 'password') chk_login(); 12 } 13} 14 15function getPublicKey() { 16 var publicKey = ""; 17 $.ajax({ 18 type: 'POST', 19 url: '/key', 20 dataType: 'json', 21 async: false, 22 success: function (data) { 23 publicKey = data.result; 24 } 25 }); 26 return publicKey; 27} 28 29function getJsencrypt(publicKey) { 30 var jsencrypt = new JSEncrypt(); 31 jsencrypt.setPublicKey(publicKey); 32 return jsencrypt; 33} 34 35function chk_login(){ 36 var frm = document.frm; 37 if(frm.userId.value.length<1){ 38 alert("íìID(ì´ë©ì¼ì£¼ì)를 ì ë ¥í´ ì£¼ì¸ì"); 39 frm.userId.focus(); 40 return; 41 } 42 if(frm.pass.value.length<1){ 43 alert("ë¹ë°ë²í¸ë¥¼ ì ë ¥í´ ì£¼ì¸ì"); 44 frm.pass.focus(); 45 return; 46 } 47 48 //ìí¸í ì²ë¦¬ 49 var userId = frm.userId.value; 50 var pass = frm.pass.value; 51 52 var jsencrypt = getJsencrypt(getPublicKey()); 53 54 //1ì°¨ ìí¸í 55 $.ajax({ 56 type: 'POST', 57 url: '/security', 58 dataType: 'json', 59 data: {"userId" : jsencrypt.encrypt(userId), "pass" : jsencrypt.encrypt(pass)}, 60 success: function (data) { 61 if (data.result == "ok") { 62 63 var frm = document.frm; 64 if(frm.checksaveid.checked){ 65 saveid(); 66 }else{ 67 frm.checksaveid.checked = false; 68 } 69 70 location.href = "/"; 71 72 } else { 73 if(data.result == "fail") { 74 alert("ì ì ì¹ì¸ íìì´ ìëëë¤. ê³ ê°ì¼í°ë¡ 문ìí´ì£¼ì¸ì."); 75 } else { 76 alert("ë¡ê·¸ì¸ ì ë³´ê° ì¬ë°ë¥´ì§ ììµëë¤."); 77 } 78 } 79 }, 80 error:function(request,status,error){ 81 alert("ì½ë : "+request.status+"\n"+"ì¶ë ¥ : "+request.responseText+"\n"+"ìë¬ : "+error); 82 } 83 }); 84} 85 86function saveid() { 87 var frm = document.frm; 88 var saveid = frm.userId.value; 89 90 setEncCookie("saveid", saveid); 91} 92 93 94function getsaveid() { 95 var frm = document.frm; 96 var saveid = getDecCookie("saveid"); 97 98 if(saveid) { 99 frm.userId.value = saveid; 100 frm.checksaveid.checked = true; 101 } 102} 103 104 // ë¹ë°ë²í¸ë¥¼ RSAë¡ ìí¸ííë¤. 105 function fnRsaEnc(value, rsaPublicKeyModulus, rsaPpublicKeyExponent) { 106 var rsa = new RSAKey(); 107 rsa.setPublic(rsaPublicKeyModulus, rsaPpublicKeyExponent); 108 var encValue = rsa.encrypt(value); 109 return encValue; 110 }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.