Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
038a6a4b
Commit
038a6a4b
authored
Jun 12, 2014
by
Stephane Glondu
Browse files
Remove trailing "=" from JS version of sha256_b64
parent
f45ba5fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/platform/js/platform.ml
View file @
038a6a4b
...
...
@@ -30,8 +30,13 @@ let sha256_hex x =
[
|
sha256
x
|
]
|>
Js
.
to_string
let
sha256_b64
x
=
Js
.
Unsafe
.
meth_call
sjcl
"codec.base64.fromBits"
[
|
sha256
x
|
]
|>
Js
.
to_string
let
raw
=
Js
.
Unsafe
.
meth_call
sjcl
"codec.base64.fromBits"
[
|
sha256
x
|
]
|>
Js
.
to_string
in
match
(
try
Some
(
String
.
index
raw
'
=
'
)
with
Not_found
->
None
)
with
|
Some
i
->
String
.
sub
raw
0
i
|
None
->
raw
let
b64_encode_compact
x
=
assert
false
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment