Documentation ¶
Index ¶
- Constants
- Variables
- func Decipher(key Key, buf []byte) error
- func DecipherStream(key Key, r io.Reader, w io.Writer) error
- func DecipherStreamTrimNull(key Key, r io.Reader, w io.Writer) error
- func DecryptBlock(key Key, buf []byte)
- func Encipher(key Key, buf []byte) error
- func EncipherStream(key Key, r io.Reader, w io.Writer) error
- func EncipherStreamPadNull(key Key, r io.Reader, w io.Writer) error
- func EncryptBlock(key Key, buf []byte)
- type Key
Constants ¶
View Source
const BlockSize = 8
BlockSize is the number of bytes in an XTEA block (for convenience.)
Variables ¶
View Source
var ( KeyUS = Key{0x03F607A9, 0x036F5A3E, 0x011002B4, 0x04AB00EA} KeyJP = Key{0x020A5FD4, 0x01EEBDFF, 0x02B3C6A0, 0x04F6A3E1} KeyTH = Key{0x050AD33B, 0x00BAFF09, 0x0452FFDA, 0x02CB4422} KeyEU = Key{0x01E986D8, 0x05818479, 0x03D2B0BB, 0x02C9B030} KeyID = Key{0x01640DB7, 0x01455A9B, 0x027F1AB7, 0x05918B54} KeyKR = Key{0x0485B576, 0x05148E02, 0x05141D96, 0x028FA9D6} )
XTEA keys used in PangYa.
Functions ¶
func DecipherStream ¶
DecipherStream decrypts a stream of data with XTEA.
func DecipherStreamTrimNull ¶
DecipherStreamTrimNull decrypts a stream of data with XTEA and trims nulls at the end.
func DecryptBlock ¶
DecryptBlock decrypts a single block of data. Note that XTEA blocks are 8 bytes long.
func EncipherStream ¶
EncipherStream encrypts a stream of data with XTEA.
func EncipherStreamPadNull ¶
EncipherStreamPadNull encrypts a stream of data with XTEA, inserting null bytes to meet XTEA's block alignment requirements.
func EncryptBlock ¶
EncryptBlock encrypts a single block of data. Note that XTEA blocks are 8 bytes long.
Types ¶
Click to show internal directories.
Click to hide internal directories.