Code Monkey home page Code Monkey logo

tpobfuscatedstring's Introduction

TPObfuscatedString

CocoaPods Compatible Language Platform License Twitter Website

TPObfuscatedString is a simple extension for String in Swift. It allows you to obfuscate hardcoded Strings in your compiled binary.

To try it out, use the commandline strings.

This project is not supposed to be a copy of the library UAObfuscatedString! TPObfuscatedString uses basic Swift code to improve security even more!

Acknowledgment

A big thank you to UrbanApps and their project UAObfuscatedString! It is a great library and the initial spark for me to create this pure swift library.

How does it work?

TPObfuscatedString does not save any Strings to the compiled binary. Actually it uses UnicodeScalars to find the correct letter!

Now Hackers won't be able to extract strings from your binary anymore!

Communication

  • If you need help, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, see Contributing section.

Installation

Via CocoaPods
To integrate TPObfuscatedString into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'TPObfuscatedString'

Manually

  1. Add TPObfuscatedString.swift to your project.
  2. That's it!

Usage

Using this library is very simple. First of all you need an empty String object. For your convenience you can simply use the static object TPObStr which is nothing different than an empty String.

Every letter has a corresponding method name. These methods are case-sensitive! Special character and numbers have a spelled out method. All visible ASCII characters are supported by now!

Example:

TPObStr.T.h.i.s.space.i.s.space.a.n.space.e.x.a.m.p.l.e.space.t.e.x.t.colon.space.H.i.exclamation

This returns this string: This is an example text: Hi!

Performance

This kind of obfuscated is slower than a hardcoded value which is pulled from the binary/memory. But you can combine this with a caching algorithm to fasten it up! Also this library is only recommended for short strings!

Contributing

I would appreciate it a lot to see you improving this library! The easiest way to contribute is fork the repo and send me a pull request after you created your adaption.

Please be sure the project builds without any warnings or errors before submitting a pull request!

I will respond to you and merging your changes into the master project as soon as possible!

Author

Philip Niedertscheider

Website

License

TPLocalizedError is available under the MIT license. See the LICENSE file for more info.

tpobfuscatedstring's People

Contributors

danwilliams64 avatar jimmyti avatar readmecritic avatar

Watchers

 avatar  avatar

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.