Skip to content

Simple framework for HMAC encryption in Swift for iOS, tvOS and macOS

License

Notifications You must be signed in to change notification settings

lukszar/EasyCrypt

Repository files navigation

EasyCrypt logo

Build passing Swift 4.2 Carthage compatible

EasyCrypt

Simple framework for HMAC encoding in Swift for iOS, tvOS and macOS

Installation

You can add framework to your project manually, or ...

add framework using Carthage:

github "lukszar/EasyCrypt"

Examples

Below look at examples you can use in your app.

Create encrypted message

  let crypto = EasyCrypt(secret: "mySecretKey", algorithm: .sha256)
  let result = crypto.hash("This is very secret text to encrypt")
  let otherResult = crypto.hash("This is another secret text to encrypt")

  print("result: ", result)
  print("otherResult: ", otherResult)

App demo

Inside project you can find Playground demo.

Disclaimer

This program is a free software. You use it at your own risk. I don't take any responsibility for any damage, loss etc. which is an result of using this software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under condition of adding an info about author of this software (Łukasz Szarkowicz).