Swim.Crypto
swim · API reference
val nonce_size : intval tag_size : intval version_size : intval encryption_version : intval key_size : intval overhead : inttype key = Mirage_crypto.AES.GCM.keyval init_key :
string ->
(Mirage_crypto.AES.GCM.key, [> `Invalid_key_length ]) resultval generate_nonce : [> Eio.Flow.source_ty ] Eio.Flow.source -> stringval encrypt :
key:Mirage_crypto.AES.GCM.key ->
random:[> Eio.Flow.source_ty ] Eio.Flow.source ->
Cstruct.t ->
Cstruct.tval pkcs7_unpad : string -> int -> stringval decrypt :
key:Mirage_crypto.AES.GCM.key ->
Cstruct.t ->
(Cstruct.t, [> `Decryption_failed | `Too_short | `Unsupported_version ])
result