add test/b32.ml; no need to re-pad in B32.decode
This commit is contained in:
parent
c9842f5cc1
commit
b741692018
4 changed files with 24 additions and 28 deletions
|
|
@ -29,10 +29,6 @@ let decode s =
|
|||
| c -> c)
|
||||
s
|
||||
in
|
||||
(* restore padding for base32 lib *)
|
||||
let n = 8 - (String.length s mod 8) in
|
||||
let pad = String.make n '=' in
|
||||
let s = s ^ pad in
|
||||
match Base32.decode ~alphabet ~off:0 ~len:(String.length s) s with
|
||||
| Error (`Msg e) -> Error e
|
||||
| Ok v -> Ok v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue