Stilts 0.1.0-SNAPSHOT

org.projectodd.stilts.stomp.protocol.websocket
Class WebSocketChallenge

java.lang.Object
  extended by org.projectodd.stilts.stomp.protocol.websocket.WebSocketChallenge

public class WebSocketChallenge
extends Object


Constructor Summary
WebSocketChallenge()
           
 
Method Summary
static long decodeKey(String encoded)
           
static String encodeKey(long baseKey, int spaces)
           
static int[] generateKey()
           
static byte[] generateKey3()
           
protected  void generateKeys()
           
 long getKey1()
           
 String getKey1String()
           
 long getKey2()
           
 String getKey2String()
           
 byte[] getKey3()
           
 int getSpaces1()
           
 int getSpaces2()
           
static byte[] solve(long key1, long key2, byte[] key3)
           
static byte[] solve(String encodedKey1, String encodedKey2, byte[] key3)
           
 boolean verify(byte[] response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketChallenge

public WebSocketChallenge()
                   throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException
Method Detail

getKey1

public long getKey1()

getSpaces1

public int getSpaces1()

getKey1String

public String getKey1String()

getKey2

public long getKey2()

getSpaces2

public int getSpaces2()

getKey2String

public String getKey2String()

getKey3

public byte[] getKey3()

generateKeys

protected void generateKeys()

solve

public static byte[] solve(String encodedKey1,
                           String encodedKey2,
                           byte[] key3)
                    throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

solve

public static byte[] solve(long key1,
                           long key2,
                           byte[] key3)
                    throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

verify

public boolean verify(byte[] response)
               throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

encodeKey

public static String encodeKey(long baseKey,
                               int spaces)

decodeKey

public static long decodeKey(String encoded)

generateKey

public static int[] generateKey()

generateKey3

public static byte[] generateKey3()

Stilts 0.1.0-SNAPSHOT

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.