···2121end
22222323module type CURVE = sig
2424+ val name : string
2525+2426 val public_prefix : bytes
25272628 val private_prefix : bytes
···44464547module K256 : CURVE = struct
4648 open Hacl_star.Hacl
4949+5050+ let name = "K256"
47514852 let public_prefix = Bytes.of_string "\xe7\x01"
4953···108112109113module P256 : CURVE = struct
110114 open Hacl_star.Hacl
115115+116116+ let name = "P256"
111117112118 let public_prefix = Bytes.of_string "\x80\x24"
113119
+5-5
pegasus/lib/actor_store.ml
···88 ; handle: string
99 ; email: string
1010 ; password_hash: bytes
1111- ; signing_key: bytes
1111+ ; signing_key: string
1212 ; preferences: Yojson.Safe.t
1313 ; created_at: int
1414 ; deactivated_at: int option }
···2626 handle TEXT NOT NULL UNIQUE,
2727 email TEXT NOT NULL UNIQUE,
2828 password_hash BLOB NOT NULL,
2929- signing_key BLOB NOT NULL,
2929+ signing_key TEXT NOT NULL,
3030 preferences TEXT NOT NULL,
3131 created_at INTEGER NOT NULL,
3232 deactivated_at INTEGER
···5353 %string{handle},
5454 %string{email},
5555 %Blob{password_hash},
5656- %Blob{signing_key},
5656+ %string{signing_key},
5757 %Json{preferences},
5858 %int{created_at}
5959 );
···6262 let get_actor_by_identifier id =
6363 [%rapper
6464 get_opt
6565- {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @Blob{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at}
6565+ {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @string{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at}
6666 FROM actors WHERE did = %string{id} OR handle = %string{id} OR email = %string{id}
6767 LIMIT 1
6868 |sql}
···7272 let list_actors =
7373 [%rapper
7474 get_many
7575- {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @Blob{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at}
7575+ {sql| SELECT @int{id}, @string{did}, @string{handle}, @string{email}, @Blob{password_hash}, @string{signing_key}, @Json{preferences}, @int{created_at}, @int?{deactivated_at}
7676 FROM actors
7777 ORDER BY created_at DESC LIMIT %int{limit} OFFSET %int{offset}
7878 |sql}