Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Crypto.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ KeyObject = {
include Impl
}

type binaryToTextEncoding =
| @as("base64") Base64
| @as("base64url") Base64url
| @as("hex") Hex
| @as("binary") Binary

module PivateKey = {
include KeyObject.Impl
type kind = [KeyObject.privateKey]
Expand Down Expand Up @@ -60,6 +66,9 @@ module Hash = {
@send external copy: t => t = "copy"
@send external digest: t => Buffer.t = "digest"
@send external update: (t, Buffer.t) => unit = "update"
@send external updateString: (t, string) => t = "update"
@send external updateStringWithEncoding: (t, string, NodeJs.StringEncoding.t) => t = "update"
@send external digestWithEncoding: (t, binaryToTextEncoding) => string = "digest"
}
include Impl
}
Expand Down
Loading