Skip to content

nicholasspencer/obvue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obvue

CLI for generating obfuscated keys based on http://www.splinter.com.au/2019/05/05/obfuscating-keys/

Installation

Add obvue to your package description

let package = Package(
    name: "AppDependencies",
    products: [
        .library(name: "Dependencies", targets: ["Dependencies"]),
    ],
    dependencies: [
        .package(url: "https://github.com/nicholasspencer/obvue.git", from: "0.0.0"),
    ],
    targets: [
        .target(name: "Dependencies", dependencies: ["ObvueCore"]),
    ]
)

Usage

Generate obfuscated data

> swift run obvue "xyz"
[77, 45, 171, 53, 84, 209]

Deobfuscate

import Foundation
import ObvueCore

class Application: NSApplication {
    let secret: [UInt8] = [77, 45, 171, 53, 84, 209]

    lazy var authenticator: Authenticator? = {
        guard let secret: String = Obfuscator.deobfuscate(obfuscated: secret) else {
                return nil
        }
        return Authenticator(secret: secret)
    }()
}

About

CLI for generating obfuscated keys

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages