Giter VIP home page Giter VIP logo

cross-platform-aes-encryption-128bit's Introduction

Cross platform 128bit AES encryption / decryption.

This project contains the implementation of 128 bit AES encryption which works on all the platforms (C#, iOS(Swift), Java Android, PHP and Java backend).

Platforms Supported:

  1. iOS Swift4)

  2. Java Android

  3. Dot Net (C#) [Also works with .Net Core]

  4. Java Backend

  5. PHP

Features:

Cross platform support. Encryption-Decryption works across C#, Swift, Java and PHP.

How to encrypt/decrypt a string:

See code samples for more details. You'll have to perform following steps:

  1. Use a common secret key across all platform.
  2. Call the CryptoHelper.encrypt(String) for encryption.
  3. Call the CryptoHelper.decrypt(String) for decryption.

PHP Uses https://gist.github.com/mataprasad/baefc94bc575b83e13f26bb38de42383 PHP Uses

Swift Uses https://gist.github.com/mataprasad/706b60b07b981a26fd27255a78f00dc7 Swift Uses

Java Uses https://gist.github.com/mataprasad/23566b1dde487b63b047e7bd906d820a Java Uses

C# Uses https://gist.github.com/mataprasad/5d746e57d43c197120a82a6b4e51e3c7 C# Uses

cross-platform-aes-encryption-128bit's People

Contributors

mataprasad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cross-platform-aes-encryption-128bit's Issues

Error - Error dataPaddingRequired

public static func decrypt(input:String)->String?{
do{
let d=Data(base64Encoded: input)
let decrypted = try AES(key: key, iv: key, padding: .pkcs7).decrypt(
d!.bytes)
return String(data: Data(decrypted), encoding: .utf8)
}catch let error{
print("Error",error)
}
return nil
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.