Examples of EncryptionKeyResponseMessage


Examples of net.glowstone.net.message.login.EncryptionKeyResponseMessage

        buffer.readBytes(sharedSecret);

        byte[] verifyToken = new byte[ByteBufUtils.readVarInt(buffer)];
        buffer.readBytes(verifyToken);

        return new EncryptionKeyResponseMessage(sharedSecret, verifyToken);
    }
View Full Code Here

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

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

          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

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

          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
Copyright © 2018 www.massapi.com. 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.