Skip to content

Commit f43c501

Browse files
add base 64
1 parent 52736dc commit f43c501

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

src/Fable.Python.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Compile Include="stdlib/Builtins.fs" />
1414
<Compile Include="stdlib/Json.fs" />
1515
<Compile Include="stdlib/Html.fs" />
16+
<Compile Include="stdlib/Base64.fs" />
1617
<Compile Include="stdlib/Math.fs" />
1718
<Compile Include="stdlib/Os.fs" />
1819
<Compile Include="stdlib/Queue.fs" />

src/stdlib/Base64.fs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module Fable.Python.Base64
2+
3+
open Fable.Core
4+
5+
// fsharplint:disable MemberNames
6+
7+
type IExports =
8+
abstract b64encode : byte[] -> byte[]
9+
abstract b64encode : s : byte[] * altchars: byte[] -> byte[]
10+
11+
abstract b64decode : byte[] -> byte[]
12+
abstract b64decode : string -> byte[]
13+
abstract b64decode : s: byte[] * altchars : byte[] -> byte[]
14+
abstract b64decode : s: string * altchars : byte[] -> byte[]
15+
abstract b64decode : s: byte[] * altchars : byte[] * validate: bool -> byte[]
16+
abstract b64decode : s: string * altchars : byte[] * validate: bool -> byte[]
17+
abstract b64decode : s: byte[] * validate: bool -> byte[]
18+
abstract b64decode : s: string * validate: bool -> byte[]
19+
20+
abstract standard_b64encode : byte[] -> byte[]
21+
abstract standard_b64decode : string -> byte[]
22+
abstract standard_b64decode : byte[] -> byte[]
23+
abstract urlsafe_b64encode : byte[] -> byte[]
24+
abstract urlsafe_b64decode : string -> byte[]
25+
abstract urlsafe_b64decode : byte[] -> byte[]
26+
abstract b32encode : byte[] -> byte[]
27+
abstract b16encode : byte[] -> byte
28+
29+
/// Miscellaneous operating system interfaces
30+
[<ImportAll("base64")>]
31+
let base64: IExports = nativeOnly

0 commit comments

Comments
 (0)