Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Dec 10, 2025. It is now read-only.
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
67 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

swift-version swift-package-manager platform ci-status license

๐Ÿ‘‰โš ๏ธ๐Ÿ—„๏ธ Archived ๐Ÿ—„๏ธโš ๏ธ๐Ÿ‘ˆ

This package is now obsolete. Use Apple's Swift Crypto instead: https://github.com/apple/swift-crypto

AESCryptable ๐Ÿ”’

Provides Advanced Encryption Standard (AES) capabilities.

Integration

Xcode 11+

AESCryptable Xcode 11 SPM

(More on the topic from WWDC 2019: Adopting Swift Packages in Xcode and Creating Swift Packages.)

Via Package.swift

In your Package.swift, add AESCryptable as a dependency:

dependencies: [
  // ๐Ÿ” AES encryption/decryption with random iv. Swift 5 and up.
  .package(url: "https://github.com/backslash-f/aescryptable", from: "1.0.0")
],

Associate the dependency with your target:

targets: [
  .target(name: "App", dependencies: ["AESCryptable"])
]

Run: swift build

Usage

import AESCryptable

do {
  // encrypt
  let aes = try AES(keyString: "01234567890123456789012345678901")
  let encryptedData = try aes.encrypt("The black knight always triumphs!")

  // decrypt
  let decryptedString = try aes.decrypt(encryptedData)
  print(decryptedString) // The black knight always triumphs!

} catch {
  print(error)
}

(Refer to the test class for a high-level overview.)

Demo

Clone the repo and use AESCryptable.playground to see the code in action:

AESCryptable Demo

About

AES encryption/decryption with random iv ๐Ÿ”’

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.