Skip to content
This repository
Browse code

[fix] Crypto.Base64: better implementation, not using OCaml Crypto lib

  • Loading branch information...
commit 3ec1811913028a7e61b36db0926a78500aa510aa 1 parent c04274b
Frederic Ye Aqua-Ye authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 plugins/crypto/bslCrypto.ml
6 plugins/crypto/bslCrypto.ml
@@ -20,11 +20,13 @@ let md5 = (fun x -> Digest.to_hex (Digest.string x))
20 20
21 21 ##register base64_encode : string -> string
22 22 let base64_encode str =
23   - Cryptokit.transform_string (Cryptokit.Base64.encode_multiline ()) str
  23 + BaseString.base64encode str
  24 + (* Cryptokit.transform_string (Cryptokit.Base64.encode_compact ()) str *)
24 25
25 26 ##register base64_decode : string -> string
26 27 let base64_decode str =
27   - Cryptokit.transform_string (Cryptokit.Base64.decode ()) str
  28 + BaseString.base64decode str
  29 + (* Cryptokit.transform_string (Cryptokit.Base64.decode ()) str *)
28 30
29 31 ##register hmac_sha1 : string, string -> string
30 32 let hmac_sha1 key text =

0 comments on commit 3ec1811

Please sign in to comment.
Something went wrong with that request. Please try again.