Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Fable.Python.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Compile Include="stdlib/Builtins.fs" />
<Compile Include="stdlib/Json.fs" />
<Compile Include="stdlib/Html.fs" />
<Compile Include="stdlib/Base64.fs" />
<Compile Include="stdlib/Math.fs" />
<Compile Include="stdlib/Os.fs" />
<Compile Include="stdlib/Queue.fs" />
Expand Down
31 changes: 31 additions & 0 deletions src/stdlib/Base64.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module Fable.Python.Base64

open Fable.Core

// fsharplint:disable MemberNames

type IExports =
abstract b64encode : byte[] -> byte[]
abstract b64encode : s : byte[] * altchars: byte[] -> byte[]

abstract b64decode : byte[] -> byte[]
abstract b64decode : string -> byte[]
abstract b64decode : s: byte[] * altchars : byte[] -> byte[]
abstract b64decode : s: string * altchars : byte[] -> byte[]
abstract b64decode : s: byte[] * altchars : byte[] * validate: bool -> byte[]
abstract b64decode : s: string * altchars : byte[] * validate: bool -> byte[]
abstract b64decode : s: byte[] * validate: bool -> byte[]
abstract b64decode : s: string * validate: bool -> byte[]

abstract standard_b64encode : byte[] -> byte[]
abstract standard_b64decode : string -> byte[]
abstract standard_b64decode : byte[] -> byte[]
abstract urlsafe_b64encode : byte[] -> byte[]
abstract urlsafe_b64decode : string -> byte[]
abstract urlsafe_b64decode : byte[] -> byte[]
abstract b32encode : byte[] -> byte[]
abstract b16encode : byte[] -> byte

/// Base16, Base32, Base64, Base85 Data Encodings
[<ImportAll("base64")>]
let base64: IExports = nativeOnly