Examples of EncryptionChannelProcessor


Examples of org.spout.api.security.EncryptionChannelProcessor

    final byte[] sharedSecret = SecurityHandler.getInstance().getSymetricKey();
    CipherParameters symmetricKey = new ParametersWithIV(new KeyParameter(sharedSecret), sharedSecret);

    fromServerCipher.init(SecurityHandler.DECRYPT_MODE, symmetricKey);

    EncryptionChannelProcessor fromServerProcessor = new EncryptionChannelProcessor(fromServerCipher, 32);
    message.getProcessorHandler().setProcessor(fromServerProcessor);

    session.send(Session.SendType.FORCE, new PlayerStatusMessage(PlayerStatusMessage.INITIAL_SPAWN)); // Ready to login;
  }
View Full Code Here

Examples of org.spout.api.security.EncryptionChannelProcessor

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

          fromClientCipher.init(SecurityHandler.DECRYPT_MODE, symmetricKey);
          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);
View Full Code Here

Examples of org.spout.api.security.EncryptionChannelProcessor

          BufferedBlockCipher toServerCipher = SecurityHandler.getInstance().getSymmetricCipher(streamCipher, streamWrapper);

          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);
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.