WorldPackageCheck
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
public static class WorldPackageCheckNamespace NodeWorld.SDK.Shared.
The checks the game makes on a world's package before using any of its files, in this order: the format version (ReadManifest), the creator's signature of the manifest (VerifySignature), then the size and SHA-256 of each file as it is downloaded (VerifyFile). Each refusal throws WorldPackageRejectedException. The game server makes the same checks on the packages it hosts.
Constants
ManifestFileName
public const string ManifestFileName = "manifest.json"Name of the manifest at the root of the package.
OldestSchemaVersion
public const int OldestSchemaVersion = 3The oldest manifest format this game reads; an older world must be published again by its creator.
NewestSchemaVersion
public const int NewestSchemaVersion = WorldManifest.CurrentSchemaVersionThe newest manifest format this game reads; a newer world needs a newer NodeWorld.
Methods
ReadManifest
public static WorldManifest ReadManifest(byte[] manifestBytes)The manifest of manifestBytes when this game reads its format. Throws WorldPackageRejectedException for a format too old or too new, and for bytes that are no manifest.
VerifySignature
public static void VerifySignature(byte[] manifestBytes, byte[] signatureBytes, WorldManifest manifest, string worldId)Throws WorldPackageRejectedException unless signatureBytes (manifest.sig) is the signature of manifestBytes by the creator's key the manifest carries, and the manifest is the world worldId.
VerifyFile
public static void VerifyFile(WorldManifest manifest, string path, byte[] bytes)Throws WorldPackageRejectedException unless bytes is the file path (from the root of the package) the signed manifest lists, with its size and SHA-256.
FindFile
public static WorldManifestFile FindFile(WorldManifest manifest, string path)The entry of path (from the root of the package) in the manifest's file list, or null.
PlatformFilePath
public static string PlatformFilePath(WorldManifestPlatform platform, string relativePath)The path from the root of the package of relativePath, a file of platform's folder.
