|
Thank you Sir
Act as though it were impossible to fail
|
|
|
|
|
Anele Ngqandu wrote: Also what is the best way to encrypt passwords? Just google for examples of encryption in java and you should find lots of examples.
Also, it is recommended that a password be hashed, as Richard mentions, and then store the hash but there are times where encryption is needed.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Act as though it were impossible to fail
|
|
|
|
|
RyanDev wrote: there are times where encryption is needed.
I can think of two, and "authenticating users" isn't one of them.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
what are those 2?
Act as though it were impossible to fail
|
|
|
|
|
- You need to store a password to access an external system or service;
- You're writing your own password manager, and need to be able to see the original password;
For the simple case of "validate that the user entered the correct password", encryption is only slightly better than plain text.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: and "authenticating users" isn't one of them. Actually, I've had to do this before. I agree it is not ideal but when interfacing with other systems, sometimes you have to do it this way.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
"Authenticating to a remote system" was one of the cases I was thinking of. I was just trying to keep it separate from "validating that the user entered the correct password".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ahh I see!!Cool thank you
Act as though it were impossible to fail
|
|
|
|
|
Hi...i am very new to data mining,am working on web usage mining currently.can any one suggest me how do i preprocess the web server log file...i am using java programming language...
|
|
|
|
|
|
How to use the interceptor to encrypt and decrypt all the get or post request encryption address bar (browser address)
James Cui
|
|
|
|
|
Does this have something to do with Java?
|
|
|
|
|
I just want to use the interceptor before sending address to let others see the browser's address is encryption of similar HTTPS encryption protocol that skill I don't know how to start now
|
|
|
|
|
|
HTML PAGE:
<form id="detailsform">
<label for="cust_name">Name</label>
<input id="cust_name" type="text"/>
<label for="cust_id">Customer-ID</label>
<input id="cust_id" type="text" />
<label for="cust_phone">Phone Number</label>
<input id="cust_phone" type="number" />
<label for="cust_add">Address</label>
<input id="cust_add" type="text" />
<label for="cust_issue">Issue</label>
<input id="cust_issue" type="text" />
<label for="complaint_date">Date of Complaint</label>
<input id="complaint_date" type="text" />
<!--<label for="appt_date">Date of Appointment</label>
<input id="appt_date" type="text" />-->
<table align="center" width="100%">
<tr>
<td align="left" width="35%"><a href="#historypage" style="text- decoration:none">
<input type="button" value="Show History" data-icon="back" data-iconpos="right" id="History" onClick()="getHistory()"/>
</a></td>
<td align="right" width="35%"><a href="#assessmentpage" style="text-decoration:none">
<input type="button" value="Start Assessment" data-icon="check" data-iconpos="right" id="Assessment"/>
</a></td>
</tr>
</table>
</form>
<div data-role="page" id="historypage" data-theme="f">
<div data-role="content">
<form id="historyForm">
<label for="hist_cname">Customer Name</label>
input id="hist_cname" type="text" />
<label for="hist_cid">CustomerID</label>
<input id="hist_cid" type="text" />
</form>
<div id="emp_tb1" align="center" data-theme="b">Here are the details </div>
</div>'
SCRIPT:
function getHistory() {
var cust_id = document.getElementById("cust_id");
var myTable = '';
myTable += '<table id="myTable" cellspacing=0 cellpadding=2 border=1>';
myTable += "<tr><td>S.No.</td><td>Date</td><td>Time</td><td>Complaint(s)</td></tr>";
var url = "http://localhost:8080/POS/rest/WebServices/getHistory/"+cust_id.value;
$.getJSON(url, function(json) {
$.each(json, function(i, v) {
myTable += "<tr><td>" + v.date + "</td><td>"+ v.time + "</td><td>" + v.issue
+ "</td><td>" ;
});
});
what i have to do here is,when i clicked the button the function is called and the corresponding result is stored in mytable variable and the result varailbe has to be displayed in history page. here how to navigate from detailsform to historypage while calling the function???
|
|
|
|
|
|
|
Hi,
I have a registration form(in jsp) with a password field.
I want to convert that password to md5 in client side before storing it to data base.when retriving that password that md5 password will travel in the network and decript to its original one in the client side jsp page.ALL THE ENCRIPTION AND DECRIPTION WILL BE DONE IN CLIENT SIDE JSP PAGES ONLY.and md5 password will travel in the network
|
|
|
|
|
|
Not only is MD5 deprecated in favour of more secure algorithms, it's a hashing algorithm, not an encryption algorithm. There is no "password", and you cannot "decrypt" the hashed value.
But that's a good thing, because you should never be able to decrypt the user's password. To validate that the user has entered the correct password, you just apply exactly the same hashing algorithm to the entered password, and compare the result to the stored hash value.
Salted Password Hashing - Doing it Right[^]
As for doing the hashing on the client side, that's a very bad idea. Anyone who can sniff the network traffic doesn't need to know the original password to impersonate the user; they can just submit the hashed password instead.
Set up an SSL certificate on your site, and ensure that your login page is only ever served over HTTPS. That way, the infrastructure will protect the password in-flight, and you can do your salted password hashing on the server, where it belongs.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am currently working on an Android application (my first) and I am trying to add the licensing code that I use for all my other applications. The issue I have run into is that all my other programs were written in VB.NET and there is a hashing function that uses UInteger . I recently discovered that Java doesn't have unsigned integers so my hash function in Android is failing to give the same results as my .NET equivalent. Unfortunately I've used this code in too many projects to go change the hashing routine in all my other applications. The issue is occurring in this piece of code:
for(byte b : uniBytes){
hash += b;
hash += (hash << 10); <--This returns negative numbers
hash ^= (hash >>> 6);
}
I tried implementing some logic so that after every operation the code would check if the hash variable was negative and if so convert it to a long such as long lngHash = 0xFFFFFFFFL & hash; , and I understand why it must be converted to a long. However, after a few more operations the hash would start to become incorrect again. I am assuming this is because if the number reaches a range that can fit into an integer, I must convert the number back to an integer in the same way when it grew I needed to convert it to an long.
I have even tried some open source libraries but they didn't support the shift operators. Any suggestions or insights into this? Am I at least on the right track with having to convert the hash back and forth between an integer and long as need? Any help or guidance of how to get this method to work is greatly appreciated. Thanks.
A black hole is where God tried to divide by zero.
There are 10 kinds of people in the world; those who understand binary and those who don't.
|
|
|
|
|
import java.util.*;
public class Vector {
int x,y;
int value;
public Vector(int i, int j) {
x=i;
y=j;
}
Vector vectorPlus(Vector v) {
return new Vector(x+v.x,y+v.y);
}
public size(){
value=Pow(x,2)+Pow(y,2);
}
public String toString() {
return "("+x+","+y+")";
}
public static void main(String[] args) {
Vector bordar= new Vector();
System.out.println("che tedad bordar mikhahid az vorodi begirid?");
Scanner scanner=new Scanner(System.in);
int tedad=scanner.nextInt();
for(int i=1;i<=tedad;i++)
{
//i should type some code
}
}
}
|
|
|
|
|
1) It is not in a preformatted block;
2) We know nothing of what it should do;
3) We know nothing of what it is doing that it shouldn't do.
|
|
|
|
|
Member 11251031 wrote: //i should type some code Well, at least that part is correct. Now perhaps you could explain what your problem is.
|
|
|
|