You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							32 lines
						
					
					
						
							773 B
						
					
					
				
			
		
		
	
	
							32 lines
						
					
					
						
							773 B
						
					
					
				| function isLetter(source) {
 | |
|     for (i = 0; i < source.length; i++) {
 | |
|         char = source.charCodeAt(i);
 | |
|         if (!((char >= 65 && char <= 90) ||
 | |
|             (char >= 97 && char <= 122) ||
 | |
|             (char >= 48 && char <= 57))) {
 | |
|             return false;
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     return true;
 | |
| }
 | |
| 
 | |
| function isNormalCharacter(source) {
 | |
|     for (i = 0; i < source.length; i++) {
 | |
|         char = source.charCodeAt(i);
 | |
|         if (!(char >= 32 && char <= 126)) {
 | |
|             return false;
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     return true;
 | |
| }
 | |
| 
 | |
| function encryptPassword(password) {
 | |
|     sha256 = CryptoJS.SHA256;
 | |
|     return sha256(sha256(password).toString() + password).toString();
 | |
| }
 | |
| 
 | |
| function storeToken(token) {
 | |
|     localStorage.setItem("access_token", token);
 | |
| } |