proposal for websocket nonce

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2465 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-11-03 02:46:44 +00:00
parent 7feea04270
commit 2c280fd1c4
1 changed files with 31 additions and 0 deletions

View File

@ -185,4 +185,35 @@ public class WebSocketTest
{
}
}
/* draft 03 nonce proposal
public static void main(String[] arg) throws Exception
{
String cnonce="A23F2BCA452DDE01";
byte[] cnb = TypeUtil.fromHexString(cnonce);
String snonce="15F0D2278BCD457F";
byte[] snb = TypeUtil.fromHexString(snonce);
MessageDigest md=MessageDigest.getInstance("MD5");
md.update(cnb);
md.update("WebSocket".getBytes("ASCII"));
md.update(snb);
byte[] digest = md.digest();
System.err.println(TypeUtil.toHexString(digest));
md.reset();
md.update(snb);
md.update("WebSocket".getBytes("ASCII"));
md.update(cnb);
digest = md.digest();
System.err.println(TypeUtil.toHexString(digest));
}
*/
}