Latest 1.0.0
Homepage https://github.com/dgariya/ShaHashesWrapper
License MIT
Platforms ios 11.0
Authors

ShaHashesWrapper and UniqueKeysGeneration

ShaHashesWrapper

A simpler wrapper for SHA 256/512 to create a "Digital Digest," which is considered a one-way encryption algorithm. "One-way" means that it can never be reverse-engineered, only brute-force attacked.

General Usage

SHA "Digital Digest" for String :

let someUniqueKey = "Password+UserName+saltKey"
print("Digital Digest SHA256: (someUniqueKey.sha256)")//Returns hex string of Digest.
print("Digital Digest SHA256: (someUniqueKey.sha512)")//Returns hex string of Digest.

SHA "Digital Digest" for Data :

let someUniqueKey = "Password+UserName+saltKey"

guard let data =  someUniqueKey.data(using: .utf8) else {
print("data encoding failed")
return
}
print("SHA256 data input:(ShaHashesWrapper.hexStringFromData(input:someUniqueKey.sha256))")
print("SHA256 data input:(ShaHashesWrapper.hexStringFromData(input:someUniqueKey.sha512))")

UniqueKeysGeneration

A simple struct to generate unique keys

Time Stamp

let timeStamp = UniqueKeysGeneration().Timestamp

More specific length

let uniquelenthKey = UniqueKeysGeneration().randomString(length: 32)

Random Number beetween range

let numberBeetweenRange = UniqueKeysGeneration().randomNumberWithRange(stratRange: 999, endRange: 10000)

Installation

ShaHashesWrapper is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ShaHashesWrapper'

License

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

Latest podspec

{
    "name": "ShaHashesWrapper",
    "version": "1.0.0",
    "summary": "A simpler wrapper for SHA 256/512 to  create a Digital Digest which is considered a one-way encryption algorithm.",
    "homepage": "https://github.com/dgariya/ShaHashesWrapper",
    "license": "MIT",
    "authors": {
        "Dev": "[email protected]"
    },
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/dgariya/ShaHashesWrapper.git",
        "tag": "1.0.0"
    },
    "source_files": "ShaHashesWrapper/**/*"
}

Pin It on Pinterest

Share This