Documentation ¶
Overview ¶
Package chie is a powerful encryption/decryption tool for Cave Story's TSC script format
Decryption
tsc := chie.NewTSCParser() err := tsc.FromFile("Ballo1.tsc") if err != nil { panic(err) } err = tsc.Decrypt().ToFile("Ballo1.txt") if err != nil { panic(err) }
Encryption
tsc := chie.NewTSCParser() err := tsc.FromFile("Ballo1.txt") if err != nil { panic(err) } err = tsc.Encrypt().ToFile("Ballo1.tsc") if err != nil { panic(err) }
Index ¶
Constants ¶
View Source
const ( // Encryption is the conversion factor used for encrypting a plaintext string // to TSC format (1) Encryption = 1 // Decryption is the conversion factor used for decrypting a TSC file into // human-readable text (-1) Decryption = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TSC ¶
type TSC struct {
// contains filtered or unexported fields
}
TSC is a struct that defines a TSC input. It contains the contents of the input, the size of the input, and the output string.
func (*TSC) AllowComments ¶ added in v1.0.2
func (tsc *TSC) AllowComments()
AllowComments will ensure that the comments will remain intact in the encrypted TSC file. If this method is not called, the TSC parser will remove all comments, since the base engine doesn't support them.
func (*TSC) FromString ¶
FromString will fill the contents property of the TSC struct from the data inside of a given string
Click to show internal directories.
Click to hide internal directories.