quickfix rsa_sig shadowing string type
This commit is contained in:
parent
d28195366e
commit
dd65568d66
3 changed files with 13 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
|||
(* TODO refacto crypto+hash+fdh_rsa *)
|
||||
open Syntax
|
||||
|
||||
module Binary_format_rsa = struct
|
||||
|
|
@ -247,9 +248,18 @@ module RsaPrivateKey = struct
|
|||
Jsont.of_of_string ~kind:"RsaPrivateKey" of_b32 ~enc:to_b32
|
||||
end
|
||||
|
||||
module RsaSignature = struct
|
||||
module RsaSignature : sig
|
||||
type t
|
||||
|
||||
val sign : key:RsaPrivateKey.t -> string -> t
|
||||
val jsont : t Jsont.t
|
||||
end = struct
|
||||
type t = string
|
||||
|
||||
(* decrypt <=> sign *)
|
||||
let sign ~key bmsg =
|
||||
Mirage_crypto_pk.Rsa.decrypt ~crt_hardening:true ~key bmsg
|
||||
|
||||
let jsont =
|
||||
let of_b32 s = B32.decode s in
|
||||
let to_b32 t = B32.encode t in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue