From 1de57c874eb75cae3f1ed664e34c2af33c0c20b0 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 17 Dec 2018 21:42:49 +0100 Subject: [PATCH] reduce duplication in format --- js/comment.jsonld | 4 ++-- js/commentmeta.jsonld | 29 ----------------------------- js/pastemeta.jsonld | 23 +---------------------- js/types.jsonld | 29 +++++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 53 deletions(-) diff --git a/js/comment.jsonld b/js/comment.jsonld index fa6958c2..199f75dc 100644 --- a/js/comment.jsonld +++ b/js/comment.jsonld @@ -23,10 +23,10 @@ "@type": "pb:CipherText" }, "adata": { - "@type": "cm:AuthenticatedData" + "@type": "pb:CipherParameters" }, "meta": { "@type": "cm:MetaData" - }, + } } } \ No newline at end of file diff --git a/js/commentmeta.jsonld b/js/commentmeta.jsonld index 1dde0c2f..136b70d8 100644 --- a/js/commentmeta.jsonld +++ b/js/commentmeta.jsonld @@ -3,35 +3,6 @@ "so": "https://schema.org/", "pb": "?jsonld=types#" }, - "AuthenticatedData": { - "@container": "@list", - "@value": [ - { - "@type": "pb:InitializationVector" - }, - { - "@type": "pb:Salt" - }, - { - "@type": "pb:Iterations" - }, - { - "@type": "pb:KeySize" - }, - { - "@type": "pb:TagSize" - }, - { - "@type": "pb:Algorithm" - }, - { - "@type": "pb:Mode" - }, - { - "@type": "pb:Compression" - } - ] - }, "MetaData": { "created": { "@type": "CreationTime" diff --git a/js/pastemeta.jsonld b/js/pastemeta.jsonld index 2c4efc5e..b0e07f67 100644 --- a/js/pastemeta.jsonld +++ b/js/pastemeta.jsonld @@ -7,28 +7,7 @@ "@container": "@list", "@value": [ { - "@type": "pb:InitializationVector" - }, - { - "@type": "pb:Salt" - }, - { - "@type": "pb:Iterations" - }, - { - "@type": "pb:KeySize" - }, - { - "@type": "pb:TagSize" - }, - { - "@type": "pb:Algorithm" - }, - { - "@type": "pb:Mode" - }, - { - "@type": "pb:Compression" + "@type": "pb:CipherParameters" }, { "@type": "pb:Formatter" diff --git a/js/types.jsonld b/js/types.jsonld index be4279ad..d586226b 100644 --- a/js/types.jsonld +++ b/js/types.jsonld @@ -91,5 +91,34 @@ "RemainingSeconds": { "@type": "dp:Second", "@minimum": 1 + }, + "CipherParameters": { + "@container": "@list", + "@value": [ + { + "@type": "pb:InitializationVector" + }, + { + "@type": "pb:Salt" + }, + { + "@type": "pb:Iterations" + }, + { + "@type": "pb:KeySize" + }, + { + "@type": "pb:TagSize" + }, + { + "@type": "pb:Algorithm" + }, + { + "@type": "pb:Mode" + }, + { + "@type": "pb:Compression" + } + ] } } \ No newline at end of file