@the-hashgraph-group-ag/cryptosuites-core / JSONCanonicalizationScheme

Class: JSONCanonicalizationScheme

JSON Canonicalization Scheme (JCS) implementation according to RFC 8785.

This implementation follows the RFC 8785 specification which defines how to create a canonical representation of JSON data by: - Building on ECMAScript strict serialization methods for JSON primitives - Constraining JSON data to the I-JSON subset - Using deterministic property sorting

Implements

Constructors

Constructor

new JSONCanonicalizationScheme(): JSONCanonicalizationScheme

Returns

JSONCanonicalizationScheme

Methods

canonicalize()

canonicalize(data): string

Canonicalizes a JSON object according to RFC 8785.

Parameters

======= data

unknown

The JSON object to canonicalize.

Returns

string

The canonicalized JSON string.

Implementation of