Obfuscator
public struct Obfuscator
The struct that encapsulates decoding and encoding process of strings obfuscation
-
Initialize new instanse of
Obfuscatorstruct with given salt stringDeclaration
Swift
public init(with salt: String)Parameters
saltsalt which will be used for encoding and decoding of string for obfuscation, should not be empty
Return Value
new instanse of
Obfuscatorstruct
-
Encode given
stringparameter with salt provided early in initDeclaration
Swift
public func obfuscatingBytes(from string: String) -> [UInt8]Parameters
stringoriginal string for obfuscation
Return Value
array of bytes
-
Decode given
bytesto original string. The salt must be the same as the one used inobfuscatingBytes(from:)function.Declaration
Swift
public func revealString(from bytes: [UInt8]) -> String?Parameters
bytesarray of bytes
Return Value
Optional original string
-
Decode given
bytesto original string. The salt must be the same as the one used inobfuscatingBytes(from:)function.Declaration
Swift
public func revealData(from bytes: [UInt8]) -> DataParameters
bytesarray of bytes
Return Value
Data representation of original string
View on GitHub
Obfuscator Structure Reference