Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saschpe/kase64
Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.
https://github.com/saschpe/kase64
android base64 base64-decoding base64-encoding base64decoder base64encode base64encoder ios java jvm kotlin kotlin-android kotlin-ios kotlin-js kotlin-jvm kotlin-library kotlin-multiplatform kotlin-multiplatform-library
Last synced: 27 days ago
JSON representation
Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.
- Host: GitHub
- URL: https://github.com/saschpe/kase64
- Owner: saschpe
- License: apache-2.0
- Created: 2022-03-04T13:35:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-04T15:35:27.000Z (4 months ago)
- Last Synced: 2024-09-29T23:21:04.135Z (about 1 month ago)
- Topics: android, base64, base64-decoding, base64-encoding, base64decoder, base64encode, base64encoder, ios, java, jvm, kotlin, kotlin-android, kotlin-ios, kotlin-js, kotlin-jvm, kotlin-library, kotlin-multiplatform, kotlin-multiplatform-library
- Language: Kotlin
- Homepage:
- Size: 362 KB
- Stars: 29
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- kmp-awesome - Kase64 - Base64 encoder/decoder (Libraries / 🔧 Utils)
README
# Kase64
[![Kotlin Version](https://img.shields.io/badge/Kotlin-1.9.10-B125EA?logo=kotlin)](https://kotlinlang.org)
[![Maven Central](https://img.shields.io/maven-central/v/de.peilicke.sascha/kase64.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/de.peilicke.sascha/kase64)
[![Build Status](https://github.com/saschpe/kase64/workflows/Main/badge.svg)](https://github.com/saschpe/kase64/actions)
[![License](http://img.shields.io/:License-Apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)![badge-android](http://img.shields.io/badge/Platform-Android-brightgreen.svg?logo=android)
![badge-ios](http://img.shields.io/badge/Platform-iOS-orange.svg?logo=apple)
![badge-js](http://img.shields.io/badge/Platform-NodeJS-yellow.svg?logo=javascript)
![badge-jvm](http://img.shields.io/badge/Platform-JVM-red.svg?logo=openjdk)
![badge-linux](http://img.shields.io/badge/Platform-Linux-lightgrey.svg?logo=linux)
![badge-macos](http://img.shields.io/badge/Platform-macOS-orange.svg?logo=apple)
![badge-windows](http://img.shields.io/badge/Platform-Windows-blue.svg?logo=windows)[//]: # (![badge-tvos](http://img.shields.io/badge/Platform-tvOS-orange.svg?logo=apple))
[//]: # (![badge-watchos](http://img.shields.io/badge/Platform-watchOS-orange.svg?logo=apple))
Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, Linux, JavaScript, Windows, watchOS, tvOS
and plain JVM environments.**Supported encodings**
- [Standard (Rfc 4648 section 4)](https://www.ietf.org/rfc/rfc4648.html#section-4)
- [URL-safe (Rfc 4648 section 5)](https://www.ietf.org/rfc/rfc4648.html#section-5)## Download
Artifacts are published to [Maven Central][maven-central]:
```kotlin
repositories {
mavenCentral()
}dependencies {
implementation("de.peilicke.sascha:kase64:1.2.0")
}
```## Usage
Standard Base64 decoding and encoding:
```kotlin
import saschpe.kase64.*val helloWorld = "SGVsbG8sIHdvcmxkIQ==".base64Decoded // "Hello, world!"
println("Hello, world!".base64Encoded) // Prints "SGVsbG8sIHdvcmxkIQ=="
```URL-safe Base64 decoding and encoding:
```kotlin
import saschpe.kase64.*val helloWorld = "SGVsbG8sIHdvcmxkIQ".base64UrlDecoded // "Hello, world!"
println("Hello, world!".base64UrlEncoded) // Prints "SGVsbG8sIHdvcmxkIQ"
```## License
Copyright 2022 Sascha Peilicke
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[maven-central]: https://search.maven.org/artifact/de.peilicke.sascha/kase64