Ocamlnet 3 Reference Manual : Netmech_scram

`sig
type ptype = [ `GSSAPI ]
type mechanism = [ `SHA_1 ]
type profile = {
ptype : Netmech_scram.ptype;
mechanism : Netmech_scram.mechanism;
return_unknown_user : bool;
iteration_count_limit : int;
}
type server_error =
[ `Channel_binding_not_supported
| `Channel_bindings_dont_match
| `Extension of string
| `Extensions_not_supported
| `Invalid_encoding
| `Invalid_proof
| `Invalid_username_encoding
| `No_resources
| `Other_error
| `Server_does_support_channel_binding
| `Unknown_user
| `Unsupported_channel_binding_type ]
type client_session
type server_session
exception Invalid_encoding of string * string
exception Invalid_username_encoding of string * string
exception Extensions_not_supported of string * string
exception Protocol_error of string
exception Invalid_server_signature
exception Server_error of Netmech_scram.server_error
val profile :
?return_unknown_user:bool ->
?iteration_count_limit:int ->
Netmech_scram.ptype -> Netmech_scram.profile
val string_of_server_error : Netmech_scram.server_error -> string
val server_error_of_string : string -> Netmech_scram.server_error
val create_client_session :
Netmech_scram.profile -> string -> string -> Netmech_scram.client_session
val client_configure_channel_binding :
Netmech_scram.client_session -> string -> unit
val client_emit_flag : Netmech_scram.client_session -> bool
val client_recv_flag : Netmech_scram.client_session -> bool
val client_finish_flag : Netmech_scram.client_session -> bool
val client_error_flag : Netmech_scram.client_session -> bool
val client_channel_binding : Netmech_scram.client_session -> string
val client_emit_message : Netmech_scram.client_session -> string
val client_recv_message : Netmech_scram.client_session -> string -> unit
val client_protocol_key : Netmech_scram.client_session -> string option
val client_user_name : Netmech_scram.client_session -> string
val client_export : Netmech_scram.client_session -> string
val client_import : string -> Netmech_scram.client_session
val create_server_session :
Netmech_scram.profile ->
(string -> string * string * int) -> Netmech_scram.server_session
val create_salt : unit -> string
val salt_password : string -> string -> int -> string
val server_emit_flag : Netmech_scram.server_session -> bool
val server_recv_flag : Netmech_scram.server_session -> bool
val server_finish_flag : Netmech_scram.server_session -> bool
val server_error_flag : Netmech_scram.server_session -> bool
val server_emit_message : Netmech_scram.server_session -> string
val server_recv_message : Netmech_scram.server_session -> string -> unit
val server_protocol_key : Netmech_scram.server_session -> string option
val server_channel_binding : Netmech_scram.server_session -> string option
val server_user_name : Netmech_scram.server_session -> string option
val server_export : Netmech_scram.server_session -> string
val server_import : string -> Netmech_scram.server_session
type specific_keys = { kc : string; ke : string; ki : string; }
module AES_CTS :
sig
val c : int
val m : int
val encrypt : string -> string -> string
val encrypt_mstrings :
string -> Xdr_mstring.mstring list -> Xdr_mstring.mstring list
val decrypt : string -> string -> string
val decrypt_mstrings :
string -> Xdr_mstring.mstring list -> Xdr_mstring.mstring list
val tests : (string * string * string) list
val run_tests : unit -> bool
val run_mtests : unit -> bool
end
module Cryptosystem :
sig
exception Integrity_error
val derive_keys : string -> int -> Netmech_scram.specific_keys
val encrypt_and_sign : Netmech_scram.specific_keys -> string -> string
val encrypt_and_sign_mstrings :
Netmech_scram.specific_keys ->
Xdr_mstring.mstring list -> Xdr_mstring.mstring list
val decrypt_and_verify :
Netmech_scram.specific_keys -> string -> string
val decrypt_and_verify_mstrings :
Netmech_scram.specific_keys ->
Xdr_mstring.mstring list -> Xdr_mstring.mstring list
val get_ec : Netmech_scram.specific_keys -> int -> int
val get_mic : Netmech_scram.specific_keys -> string -> string
val get_mic_mstrings :
Netmech_scram.specific_keys -> Xdr_mstring.mstring list -> string
end
module Debug : sig val enable : bool Pervasives.ref end
end`