This package contains an API for OpenSSL in ATS.
fun OpenSSL_add_all_ciphers ((*void*)): void = "mac#%"
fun OpenSSL_add_all_digests ((*void*)): void = "mac#%"
fun OpenSSL_add_all_algorithms ((*void*)): void = "mac#%"
fun EVP_cleanup ((*void*)): void = "mac#%"
abstype
EVP_MD_ref (l:addr) = ptr (l)
typedef EVP_MD_ref0 = [l:agez] EVP_MD_ref (l)
typedef EVP_MD_ref1 = [l:addr | l > null] EVP_MD_ref (l)
castfn
EVP_MD_ref2ptr
{l:addr} (EVP_MD_ref(l)):<> ptr(l)
absvtype
EVP_MD_CTX_ptr (l:addr) = ptr (l)
vtypedef EVP_MD_CTX_ptr0 = [l:agez] EVP_MD_CTX_ptr (l)
vtypedef EVP_MD_CTX_ptr1 = [l:addr | l > null] EVP_MD_CTX_ptr (l)
castfn
EVP_MD_CTX_ptr2ptr
{l:addr} (ctx: !EVP_MD_CTX_ptr (l)):<> ptr (l)
praxi
EVP_MD_CTX_takeout
{l:agz}
(
ctx: !EVP_MD_CTX_ptr (l)
): (EVP_MD_CTX @ l, minus (EVP_MD_CTX_ptr (l), EVP_MD_CTX @ l))
praxi EVP_MD_CTX_objfize {l:addr} ( pf: EVP_MD_CTX@l | p: !ptrlin l >> EVP_MD_CTX_ptr (l) ) :<prf> mfree_ngc_v (l) // endfun
praxi EVP_MD_CTX_unobjfize {l:addr} ( pfgc: mfree_ngc_v (l) | ctx: !EVP_MD_CTX_ptr (l) >> ptrlin l ) :<prf> EVP_MD_CTX @ l // endfun
fun EVP_MD_CTX_init (&EVP_MD_CTX? >> _): void = "mac#%"
fun EVP_MD_CTX_cleanup (&EVP_MD_CTX >> _?): interr = "mac#%"
fun EVP_MD_CTX_create ((*void*)): EVP_MD_CTX_ptr0 = "mac#%"
fun EVP_MD_CTX_destroy (ctx: EVP_MD_CTX_ptr0): void = "mac#%"
fun EVP_MD_CTX_copy
(to: &EVP_MD_CTX? >> _, from: &RD(EVP_MD_CTX)): interr = "mac#%"
fun EVP_MD_CTX_copy_ex
(to: &EVP_MD_CTX >> EVP_MD_CTX, from: &RD(EVP_MD_CTX)): interr = "mac#%"
fun
EVP_DigestInit
(ctx: &EVP_MD_CTX? >> _, type: EVP_MD_ref1): interr = "mac#%"
fun EVP_DigestUpdate {n:int} ( ctx: &EVP_MD_CTX >> _, data: arrayref(uchar, n), n: size_t n ) : interr = "mac#%" // end of [EVP_DigestUpdate]
fun EVP_DigestFinal ( ctx: &EVP_MD_CTX >> _?, md: Ptr1, len: &int(0) >> int(n) ) : #[n:nat] interr = "mac#%" // end-of-fun
fun
EVP_DigestInit_ex
(ctx: &EVP_MD_CTX >> _, type: EVP_MD_ref1, impl: ENGINEptr): interr = "mac#%"
fun EVP_DigestFinal_ex ( ctx: &EVP_MD_CTX >> EVP_MD_CTX, md: Ptr1, len: &int(0) >> int(n) ) : #[n:nat] interr = "mac#%" // end-of-fun
fun{} EVP_Digestize_string ( dname: string, src: string, asz: &int? >> int(n) ) : #[n:nat] arrayptr (uchar, n) // end-of-fun
fun{}
EVP_DigestUpdate_string (ctx: &EVP_MD_CTX >> _, src: string): interr