This implementation class permits packets to be encrypted or decrypted depending on direction. The decrypt() method must determine if the packet is encrypted. Perhaps a special code in the first byte could help. The encrypt() method encrypts the outbound packet. Because this is not a standard it might be best to use this server at both ends of the chain and use them as proxy servers to local main servers.
RADIUSServer encrypt packets ------>over the Internet ----->another RADIUSServer decrypts packets -->local radius server.The abstract encryption EncryptImpl allows encryption and decryption of packets.