Package org.spout.vanilla.protocol.msg.auth

Examples of org.spout.vanilla.protocol.msg.auth.EncryptionKeyResponseMessage


    byte[] secret = new byte[length];
    buffer.readBytes(secret);
    int validateTokenLength = buffer.readShort() & 0xFFFF;
    byte[] validateToken = new byte[validateTokenLength];
    buffer.readBytes(validateToken);
    return new EncryptionKeyResponseMessage(false, secret, validateToken);
  }
View Full Code Here


          toClientCipher.init(SecurityHandler.ENCRYPT_MODE, symmetricKey);

          EncryptionChannelProcessor fromClientProcessor = new EncryptionChannelProcessor(fromClientCipher, 32);
          EncryptionChannelProcessor toClientProcessor = new EncryptionChannelProcessor(toClientCipher, 32);

          EncryptionKeyResponseMessage response = new EncryptionKeyResponseMessage(false, new byte[0], new byte[0]);
          response.setProcessor(toClientProcessor);

          message.getProcessorHandler().setProcessor(fromClientProcessor);

          session.send(Session.SendType.FORCE, response);
        }
View Full Code Here

          CipherParameters symmetricKey = new ParametersWithIV(new KeyParameter(sharedSecret), sharedSecret);

          toServerCipher.init(SecurityHandler.ENCRYPT_MODE, symmetricKey);
          EncryptionChannelProcessor toServerProcessor = new EncryptionChannelProcessor(toServerCipher, 32);

          EncryptionKeyResponseMessage response = new EncryptionKeyResponseMessage(false, encodedSecret, encodedToken);
          response.setProcessor(toServerProcessor);

          session.send(Session.SendType.FORCE, response);
        } catch (Exception e) {
          e.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.protocol.msg.auth.EncryptionKeyResponseMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.