CreatorKey

csharp
public sealed class CreatorKey

Namespace NodeWorld.SDK.Shared.

A creator's key: the RSA key (3072 bits, RSA-SHA256 PKCS#1) the SDK makes at the creator's first build and signs each world's manifest with. Players and hosts know the creator by its public key only, shown as its fingerprint.

Constants

KeySizeBits

csharp
public const int KeySizeBits = 3072

Size of the keys the SDK makes.

Properties

PublicKey

csharp
public string PublicKey { get; }

The public key as the manifest carries it: its SubjectPublicKeyInfo (DER) in base64.

Fingerprint

csharp
public string Fingerprint { get; }

The SHA-256 of the public key, in lowercase hexadecimal: what the game remembers.

ShortFingerprint

csharp
public string ShortFingerprint { get; }

The fingerprint as people see it, such as 7F3A-91C2.

Methods

Generate

csharp
public static CreatorKey Generate()

A new key, made on this machine.

FromPem

csharp
public static CreatorKey FromPem(string pem)

The key of a PEM file written by ToPem; throws FormatException when it holds none.

ToPem

csharp
public string ToPem()

The key as a plain PEM file ("RSA PRIVATE KEY", not encrypted).

Sign

csharp
public string Sign(byte[] data)

The signature of data, written as WorldPackageSignature.Prefix then base64.