levelsigning

package
v0.0.0-...-79996cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLevelPackSigned

func IsLevelPackSigned(lp *levelpack.LevelPack) bool

IsLevelPackSigned returns a quick answer.

func IsLevelSigned

func IsLevelSigned(lvl *level.Level) bool

IsLevelSigned returns a quick answer.

func SignLevel

func SignLevel(key *ecdsa.PrivateKey, lvl *level.Level) ([]byte, error)

SignLevel creates a signature on a level file which allows it to load its embedded doodads even for free versions of the game.

Free versions will verify a level's signature before bailing out with the "can't play levels w/ embedded doodads" response.

NOTE: this only supported Zipfile levels and will assume the level you pass has a Zipfile to access embedded assets.

func SignLevelPack

func SignLevelPack(key *ecdsa.PrivateKey, lp *levelpack.LevelPack) ([]byte, error)

SignLevelpack applies a signature to a levelpack as a whole, to allow its shared custom doodads to be loaded by its levels in free games.

func StringifyAssets

func StringifyAssets(lvl *level.Level) ([]byte, error)

StringifyAssets creates the signing checksum of a level's attached assets.

func StringifyLevelpackAssets

func StringifyLevelpackAssets(lp *levelpack.LevelPack) ([]byte, error)

StringifyLevelpackAssets creates the signing checksum of a level's attached assets.

func VerifyLevel

func VerifyLevel(publicKey *ecdsa.PublicKey, lvl *level.Level) bool

VerifyLevel verifies a level's signature and returns if it is OK.

func VerifyLevelPack

func VerifyLevelPack(publicKey *ecdsa.PublicKey, lp *levelpack.LevelPack) bool

VerifyLevelPack verifies a levelpack's signature and returns if it is OK.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL