{"id":159496,"student_id":10,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eDocument\u003c/title\u003e\\n\\t\u003clink rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css\\\"\u003e\\n\\t\u003cscript src=\\\"https://code.jquery.com/jquery-3.5.1.slim.min.js\\\"\u003e\u003c/script\u003e\\n\\t\u003cscript src=\\\"https://cdnjs.cloudflare.com/ajax/libs/cryptico/0.0.1343522940/cryptico.min.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003cdiv class=\\\"row\\\"\u003e\\n \u003cdiv class=\\\"col-4\\\"\u003e\\n \u003cinput type=\\\"text\\\" id=\\\"input-left\\\"\u003e\\n \u003cbutton id=\\\"submit-left\\\"\u003e送出\u003c/button\u003e\\n \u003cdiv class=\\\"bubbles\\\" id=\\\"bubbles-left\\\"\u003e\u003c/div\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"col-4\\\"\u003e\\n \u003cdiv class=\\\"bubbles\\\" id=\\\"bubbles-center\\\"\u003e\u003c/div\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"col-4\\\"\u003e\\n \u003cinput type=\\\"text\\\" id=\\\"input-right\\\"\u003e\\n \u003cbutton id=\\\"submit-right\\\"\u003e送出\u003c/button\u003e\\n \u003cdiv class=\\\"bubbles\\\" id=\\\"bubbles-right\\\"\u003e\u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"/* 設定整個頁面內容水平置中、內寬為 30 像素:*/\\nbody {\\n text-align: center;\\n padding: 30px;\\n}\\n\\n/* 設定圖片的寬度為銀幕一半寬 */\\nimg { \\n max-width: 50%; \\n}\\n\\n/* 設定文字的顏色為淡黑色 */\\np {\\n color: #555555;\\n}\",\"js\":\"\\n\\n\\nvar pubKeyA = cryptico.publicKeyString(keyA);\\nvar pubKeyB = cryptico.publicKeyString(keyB);\\n\\n// userA\\n//左邊使用者:小明\\nvar keyA = cryptico.generateRSAKey('hello', 1024);\\n\\nfunction sendFromA (text) {\\n text = cryptico.encrypt(text, pubKeyB).cipher;\\n return text;\\n}\\n\\nfunction receivedFromB (text) {\\n text = cryptico.decrypt(text, keyA).plaintext;\\n return text;\\n}\\n\\n\\n\\n// userB\\n//右邊使用者:小美\\nvar keyB = cryptico.generateRSAKey('heeee', 1024);\\n\\n\\nfunction sendFromB (text) {\\n text = cryptico.encrypt(text, pubKeyA).cipher;\\n return text;\\n}\\n\\nfunction receivedFromA (text) {\\n text = cryptico.decrypt(text, keyB).plaintext;\\n return text;\\n}\\n\\n\"}","created_at":"2020-06-16T15:55:00.644+08:00","updated_at":"2020-07-06T13:09:01.605+08:00","name":"非對稱加密_概念","language":"web","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/159496/a89b73869149252c5a6b483fc04335bf.jpg"},"parent_id":3,"plugin":"$('#submit-left').click(onclickA);\n$('#submit-right').click(onclickB);\n\nfunction sendToB (text) {\n appendTextEl('#bubbles-left', text, 'right');\n text = beforeSendToB(text);\n appendTextEl('#bubbles-center', text, 'center');\n receivedFromA(text);\n \n}\n\nfunction sendToB (text) {\n \n}\n\n\nfunction onclickA () {\n var text = $('#input-left').val();\n appendTextEl('#bubbles-left', text, 'right');\n text = sendFromA(text);\n appendTextEl('#bubbles-center', text, 'center');\n text = receivedFromA(text);\n appendTextEl('#bubbles-right', text, 'right');\n}\n\nfunction onclickB () {\n var text = $('#input-right').val();\n appendTextEl('#bubbles-right', text, 'left');\n text = sendFromA(text);\n appendTextEl('#bubbles-center', text, 'center');\n text = receivedFromA(text);\n appendTextEl('#bubbles-left', text, 'left');\n}\n\nfunction appendTextEl (elementId, text, align = \"center\") {\n $(elementId).append(`\u003cp class=\"${align}\"\u003e${text}\u003c/p\u003e`);\n}","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":234,"hashid":"ej9s46v2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2778002,"file_name":"koding.png","project_id":159496,"asset_id":182920,"created_at":"2020-06-16T15:55:00.649+08:00","updated_at":"2020-06-16T15:55:00.649+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦