From d7e262aa91ee34861f577a8c842368b914d12351 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Sun, 26 Jun 2022 15:55:26 +0200 Subject: AgeMask instead of AgeGroups for /keys response --- core/api-exchange.rst | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'core/api-exchange.rst') diff --git a/core/api-exchange.rst b/core/api-exchange.rst index 68a297fb..c99cadcb 100644 --- a/core/api-exchange.rst +++ b/core/api-exchange.rst @@ -245,13 +245,21 @@ possibly by using HTTPS. } - .. ts:def:: AgeGroups - - // Representation of the age groups as colon separated edges: Increasing - // from left to right, the values mark the beginning of an age group up - // to, but not including the next value. The initial age group starts at - // 0 and is not listed. Example: "8:10:12:14:16:18:21". - type AgeGroups string + .. ts:def:: AgeMask + + // Binary representation of the age groups. + // The bits set in the mask mark the edges at the beginning of a next age + // group. F.e. for the age groups + // 0-7, 8-9, 10-11, 12-14, 14-15, 16-17, 18-21, 21-* + // the following bits are set: + // + // 31 24 16 8 0 + // | | | | | + // oooooooo oo1oo1o1 o1o1o1o1 ooooooo1 + // + // A value of 0 means that the exchange does not support the extension for + // age-restriction. + type AgeMask integer .. ts:def:: DenomGroup @@ -285,7 +293,7 @@ possibly by using HTTPS. interface DenomGroupRsaAgeRestricted extends DenomGroupCommon { cipher: "RSA+age_restricted"; - age_groups: AgeGroups; + age_mask: AgeMask; denoms: ({ rsa_pub: RsaPublicKey; @@ -296,7 +304,7 @@ possibly by using HTTPS. interface DenomGroupCSAgeRestricted extends DenomGroupCommon { cipher: "CS+age_restricted"; - age_groups: AgeGroups; + age_mask: AgeMask; denoms: ({ cs_pub: Cs25519Point; -- cgit v1.2.3