JavaScript added interference data to achieve simple encryption effect _ application techniques

Source: Internet
Author: User
Copy Code code as follows:

var lishustr = "Qwertyuiopasdfghjklmnbvcxz";
var s = lishustr.split ("");
var Lishua = ""; var lishub = ""; var Lishuc = ""; var lishud = "";
Lishua = S[getrandomnum (1,26)]; Lishub = S[getrandomnum (1,26)]; Lishuc = S[getrandomnum (1,26)]; Lishud = S[getrandomnum (1,26)];
Switch ("ABCDEFGHIJKLMNOPQRSTUVWXYZ". IndexOf (Lishud) + 1) {
Case 1:case 2:case 3:case 4:case 5:case 6:case 7:
Md5words = md5words + Lishua + lishub + Lishuc + lishud; Break
Case 8:case 9:case 10:case 11:case 12:case 13:case 14:
Md5words = Lishua + md5words + lishub + Lishuc + lishud; Break
Case 15:case 16:case 17:case 18:case 19:case 20:
Md5words = Lishua + lishub + md5words + Lishuc + lishud; Break
Case 21:case 22:case 23:case 24:case 25:case 26:
Md5words = Lishua + lishub + lishuc + md5words + lishud; Break
}
function Getrandomnum (LBound, UBound) {
Return (Math.floor (Math.random () * (ubound-lbound)) + LBound);
}

This article URL: http://www.lantian360.com/blueblog/blog.asp?id=G37
Forwarding please keep this URL, thank you for your cooperation.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.