Explorar o código

reduce duplication in format

El RIDO %!s(int64=7) %!d(string=hai) anos
pai
achega
1de57c874e
Modificáronse 4 ficheiros con 32 adicións e 53 borrados
  1. 2 2
      js/comment.jsonld
  2. 0 29
      js/commentmeta.jsonld
  3. 1 22
      js/pastemeta.jsonld
  4. 29 0
      js/types.jsonld

+ 2 - 2
js/comment.jsonld

@@ -23,10 +23,10 @@
 			"@type": "pb:CipherText"
 		},
 		"adata": {
-			"@type": "cm:AuthenticatedData"
+			"@type": "pb:CipherParameters"
 		},
 		"meta": {
 			"@type": "cm:MetaData"
-		},
+		}
 	}
 }

+ 0 - 29
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"

+ 1 - 22
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"

+ 29 - 0
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"
+			}
+		]
 	}
 }