Documentation ¶
Overview ¶
* Archon PSO Server * Copyright (C) 2014 Andrew Rodman * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * --------------------------------------------------------------------- * * Blowfish implementation adapted to work with PSOBB's protocol.
Index ¶
Constants ¶
const BlockSize = 8
The Blowfish block size in bytes.
const PCBlockSize = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
A Cipher is an instance of Blowfish encryption using a particular key.
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (k KeySizeError) Error() string
type PCKeySizeError ¶
type PCKeySizeError int
func (PCKeySizeError) Error ¶
func (k PCKeySizeError) Error() string
type PSOCrypt ¶
type PSOCrypt struct { Vector []uint8 // contains filtered or unexported fields }
PSOCrypt object to be used per-client for crypto.
func NewBBCrypt ¶
func NewBBCrypt() *PSOCrypt
Returns a newly allocated PSOCrypt with randomly generated, appropriately sized keys for encrypting packets over PSOBB connections.
func NewPCCrypt ¶
func NewPCCrypt() *PSOCrypt
Returns a newly allocated PSOCrypt with randomly generated, appropriately sized keys for encrypting packets over PSOPC connections.