This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ assembly name="System.dll" #> | |
<#@ import namespace="System" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text.RegularExpressions" #> | |
<#@ import namespace="DofusProtocolBuilder" #> | |
<#@ import namespace="DofusProtocolBuilder.Parsing" #> | |
<#@ import namespace="DofusProtocolBuilder.XmlPatterns" #> | |
<#+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mambo.protocol | |
import org.mambo.core.io.Buffer | |
/** | |
* @author Blackrush | |
*/ | |
trait Serializable { | |
val deserializer: Deserializer | |
def serialize(buf: Buffer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mambo.core.io | |
import java.nio.charset.Charset | |
import java.nio.{CharBuffer, ByteBuffer} | |
/** | |
* @author Blackrush | |
*/ | |
class BigEndianBuffer(private var buf: Array[Byte], var offset: Int = 0) extends Buffer { | |
import BigEndianBuffer._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mambo.core | |
import akka.actor._ | |
import akka.util.ByteString | |
import scala.collection.mutable | |
/** | |
* @author Blackrush | |
*/ | |
class LoginActor(port: Int) extends Actor with ActorLogging { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mojito.core | |
import collection.mutable | |
/** | |
* @author Blackrush | |
* @todo implement Iterable[(Seq[K], V)] | |
*/ | |
class NavigableTree[K, V](val key: K, val value: Option[V] = None, val parent: Option[NavigableTree[K, V]] = None) { | |
type This = NavigableTree[K, V] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NotNull | |
@Override | |
public User find(byte[] bytes) { | |
byte[] decrypted; | |
try { | |
decrypted = decrypter.doFinal(bytes); | |
} catch (Exception e) { | |
throw new RuntimeException(e); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
@errors = [] | |
@user = User.authenticate(params[:username], params[:password]) | |
respond_to do |format| | |
if @user.nil? | |
@errors << t("authentication_error") | |
format.html { render :new } | |
format.json { render json: @errors } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: Decrypt error - padding function returned null! | |
at com.hurlant.crypto.rsa::RSAKey/_decrypt() | |
at com.hurlant.crypto.rsa::RSAKey/verify() | |
at com.ankamagames.dofus.logic.connection.managers::AuthentificationManager/setPublicKey() | |
at com.ankamagames.dofus.logic.connection.frames::AuthentificationFrame/process() | |
at com.ankamagames.jerakine.messages::Worker/processMessage() | |
at com.ankamagames.jerakine.messages::Worker/processMessages() | |
at com.ankamagames.jerakine.messages::Worker/onEnterFrame() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2012 Evident Solutions Oy | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ManyNetworkHandlerFactory { | |
Set<NetworkHandler> create(NetworkClient client); | |
} | |
class NetworkHandlersModule extends AbstractModule { | |
protected void configure() { | |
install(new ManyFactoryModuleBuilder(NetworkClient.class) | |
.bind(AuthenticationHandler.class) | |
.build()); | |
} |