All Projects → etienne-martin → Cryptojs.swift

etienne-martin / Cryptojs.swift

Licence: other
Cross-platform cryptographic functions in swift

Programming Languages

javascript
184084 projects - #8 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to Cryptojs.swift

Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (+223.81%)
Mutual labels:  cryptography, crypto, aes
Forge
A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps
Stars: ✭ 4,204 (+9909.52%)
Mutual labels:  cryptography, crypto, aes
jscrypto
Crypto library for Node/ES6/Typescript/Browser.
Stars: ✭ 20 (-52.38%)
Mutual labels:  crypto, aes, openssl
Diffie Hellman backdoor
How to backdoor Diffie-Hellman
Stars: ✭ 559 (+1230.95%)
Mutual labels:  cryptography, crypto, openssl
Gonnacry
A Linux Ransomware
Stars: ✭ 341 (+711.9%)
Mutual labels:  cryptography, openssl, aes
Swcrypt
RSA public/private key generation, RSA, AES encryption/decryption, RSA sign/verify in Swift with CommonCrypto in iOS and OS X
Stars: ✭ 632 (+1404.76%)
Mutual labels:  osx, openssl, aes
Siv Mode
RFC 5297 SIV mode of operation in Java
Stars: ✭ 22 (-47.62%)
Mutual labels:  cryptography, aes
Virgil Crypto Php
Virgil PHP Crypto Library is a high-level cryptographic library that allows you to perform all necessary operations for secure storing and transferring data and everything required to become HIPAA and GDPR compliant.
Stars: ✭ 22 (-47.62%)
Mutual labels:  cryptography, crypto
Aes
AES-128 hardware implementation
Stars: ✭ 25 (-40.48%)
Mutual labels:  cryptography, aes
Simon Speck C
example C language implementation of SIMON and SPECK lightweight block ciphers.
Stars: ✭ 9 (-78.57%)
Mutual labels:  cryptography, crypto
Libsodium.js
libsodium compiled to Webassembly and pure JavaScript, with convenient wrappers.
Stars: ✭ 665 (+1483.33%)
Mutual labels:  cryptography, crypto
Blog Src
Personal blog source.
Stars: ✭ 7 (-83.33%)
Mutual labels:  cryptography, aes
Crypton
Library consisting of explanation and implementation of all the existing attacks on various Encryption Systems, Digital Signatures, Key Exchange, Authentication methods along with example challenges from CTFs
Stars: ✭ 995 (+2269.05%)
Mutual labels:  cryptography, crypto
Acra
Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ("transparent") encryption. SQL, NoSQL.
Stars: ✭ 726 (+1628.57%)
Mutual labels:  cryptography, crypto
Pyopenssl
A Python wrapper around the OpenSSL library
Stars: ✭ 701 (+1569.05%)
Mutual labels:  cryptography, openssl
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+2097.62%)
Mutual labels:  cryptography, crypto
Maskbook
The portal to the new, open internet. ([I:b])
Stars: ✭ 691 (+1545.24%)
Mutual labels:  cryptography, crypto
Qml Snippet
some qml snippet.
Stars: ✭ 9 (-78.57%)
Mutual labels:  crypto, aes
Easy Crypto
A WIP module aimed at providing a safer, easier to use and beginner friendly crypto API for Node.js
Stars: ✭ 21 (-50%)
Mutual labels:  crypto, openssl
Hat.sh
encrypt and decrypt files in your browser. Fast, Secure client-side File Encryption and Decryption using the web crypto api
Stars: ✭ 886 (+2009.52%)
Mutual labels:  crypto, aes

CryptoJS.swift

Cross-platform cryptographic functions in swift using the Crypto JS library. Allows you to share the same crypto between a native iOS/OSX application and a web application.

Compatible with https://github.com/brix/crypto-js.

⚠️ New project in development

The javascript library used to implement the cryptography in this project is no longer maintained and suffers severe performance limitations over the new WebCrypto API. A new modern library called WebCrypto.swift is being developed. WebCrypto.swift leverages the power of the WebCrypto API while keeping backwards compatibility with this project.

No new development will happen in this repository. Do not submit new feature requests here. If you want something to be implemented, please submit an issue in the new repository:

https://github.com/etienne-martin/WebCrypto.swift

Platforms Supported

iOS
macOS
Web browsers
openSSL

Installation

Drag and drop CryptoJS.swift and the javascript files in your Xcode project.

AES

Supported modes: CBC (the default), CFB, CTR, OFB, ECB
Supported padding schemes: Pkcs7 (the default), Iso97971, AnsiX923, Iso10126, ZeroPadding, NoPadding

// Load the AES module
let AES = CryptoJS.AES()

// Basic AES encryption
let encrypted = AES.encrypt("Secret message", password: "password123")
let decrypted = AES.decrypt(encrypted, password: "password123")

// AES encryption with custom mode and padding
CryptoJS.mode.ECB() // Load custom mode
CryptoJS.pad.Iso97971() // Load custom padding scheme
let encrypted = AES.encrypt("Secret message", password: "password123", options:[ "mode": CryptoJS.mode().ECB, "padding": CryptoJS.pad().Iso97971 ])
let decrypted = AES.decrypt(encrypted, password: "password123", options:[ "mode": CryptoJS.mode().ECB, "padding": CryptoJS.pad().Iso97971 ])
Compatible with OpenSSL
# Basic openSSL AES encryption
openssl enc -aes-256-cbc -e -in /foo/thePlainTextFile.txt -out /bar/theEncryptedFile.txt -pass pass:"password123" -base64

# Basic openSSL AES decryption
openssl enc -aes-256-cbc -d -in /foo/theEncryptedFile.txt -out /bar/theDecryptedFile.txt -pass pass:"password123" -base64

TripleDES

// Load the TripleDES module
let TripleDES = CryptoJS.TripleDES()

// Basic TripleDES encryption
let encrypted = TripleDES.encrypt("secretMessage", password: "password123")
let decrypted = TripleDES.decrypt(encrypted, password: "password123")

DES

// Load the DES module
let DES = CryptoJS.DES()

// Basic DES encryption
let encrypted = DES.encrypt("secretMessage", password: "password123")
let decrypted = DES.decrypt(encrypted, password: "password123")

Hashers

let MD5 = CryptoJS.MD5()
let SHA1 = CryptoJS.SHA1()
let SHA224 = CryptoJS.SHA224()
let SHA256 = CryptoJS.SHA256()
let SHA384 = CryptoJS.SHA384()
let SHA512 = CryptoJS.SHA512()
let SHA3 = CryptoJS.SHA3()
let RIPEMD160 = CryptoJS.RIPEMD160()

var hash = MD5.hash("mystring")
var hash = SHA1.hash("mystring")
var hash = SHA224.hash("mystring")
var hash = SHA256.hash("mystring")
var hash = SHA384.hash("mystring")
var hash = SHA3.hash("mystring")
var hash = SHA512.hash("mystring")
var hash = SHA3.hash("mystring",outputLength: 256)
var hash = RIPEMD160.hash("mystring")

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Update the README.md with details of changes to the plugin.

Update the examples by demonstrating the changes to the plugin.

Build the project & test all the features before submitting your pull request.

Authors

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].