objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Store signing key as multibase

futurGH b1ae78a6 f1c6fc43

+11 -5
+6
kleidos/kleidos.ml
··· 21 21 end 22 22 23 23 module type CURVE = sig 24 + val name : string 25 + 24 26 val public_prefix : bytes 25 27 26 28 val private_prefix : bytes ··· 44 46 45 47 module K256 : CURVE = struct 46 48 open Hacl_star.Hacl 49 + 50 + let name = "K256" 47 51 48 52 let public_prefix = Bytes.of_string "\xe7\x01" 49 53 ··· 108 112 109 113 module P256 : CURVE = struct 110 114 open Hacl_star.Hacl 115 + 116 + let name = "P256" 111 117 112 118 let public_prefix = Bytes.of_string "\x80\x24" 113 119
+5 -5
pegasus/lib/actor_store.ml
··· 8 8 ; handle: string 9 9 ; email: string 10 10 ; password_hash: bytes 11 - ; signing_key: bytes 11 + ; signing_key: string 12 12 ; preferences: Yojson.Safe.t 13 13 ; created_at: int 14 14 ; deactivated_at: int option } ··· 26 26 handle TEXT NOT NULL UNIQUE, 27 27 email TEXT NOT NULL UNIQUE, 28 28 password_hash BLOB NOT NULL, 29 - signing_key BLOB NOT NULL, 29 + signing_key TEXT NOT NULL, 30 30 preferences TEXT NOT NULL, 31 31 created_at INTEGER NOT NULL, 32 32 deactivated_at INTEGER ··· 53 53 %string{handle}, 54 54 %string{email}, 55 55 %Blob{password_hash}, 56 - %Blob{signing_key}, 56 + %string{signing_key}, 57 57 %Json{preferences}, 58 58 %int{created_at} 59 59 ); ··· 62 62 let get_actor_by_identifier id = 63 63 [%rapper 64 64 get_opt 65 - {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @Blob{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at} 65 + {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @string{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at} 66 66 FROM actors WHERE did = %string{id} OR handle = %string{id} OR email = %string{id} 67 67 LIMIT 1 68 68 |sql} ··· 72 72 let list_actors = 73 73 [%rapper 74 74 get_many 75 - {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @Blob{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at} 75 + {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @string{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at} 76 76 FROM actors 77 77 ORDER BY created_at DESC LIMIT %int{limit} OFFSET %int{offset} 78 78 |sql}