I create an SHA512 Hash with following code:
func createSHA512(source:String) -> String {
let rawstr:NSString = NSString(format: "%@%@", source, "xxxxxxxxxxxxxx");
let data = rawstr.dataUsingEncoding(NSUTF8StringEncoding)!;
var digest = [UInt8](count:Int(CC_SHA512_DIGEST_LENGTH), repeatedValue: 0);
CC_SHA512(data.bytes, CC_LONG(data.length), &digest);
let output = NSMutableString(capacity: Int(CC_SHA512_DIGEST_LENGTH));
for byte in digest {
output.appendFormat("%02x", byte);
}
return output as String;
}
Is it possible to decrypt this Hash with Swift 2 to the original String?