Skip to content

Commit

Permalink
Merge pull request #48 from reynir/hide-internals
Browse files Browse the repository at this point in the history
Hide alphabet internals
  • Loading branch information
dinosaure authored Feb 8, 2021
2 parents 2c5d85d + 1414e51 commit 9af342c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/base64.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ let make_alphabet alphabet =

let length_alphabet { emap; _ } = Array.length emap

let alphabet { emap; _ } = emap
let alphabet { emap; _ } =
String.init (Array.length emap) (fun i -> Char.chr emap.(i))

let default_alphabet =
make_alphabet
Expand Down
2 changes: 1 addition & 1 deletion src/base64.mli
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ val make_alphabet : string -> alphabet
val length_alphabet : alphabet -> int
(** Returns length of the alphabet, should be 64. *)

val alphabet : alphabet -> int array
val alphabet : alphabet -> string
(** Returns the alphabet. *)

val decode_exn :
Expand Down

0 comments on commit 9af342c

Please sign in to comment.