The implementation of the keygen is as follows (Istarmenu CORE Keygen)

Source: Internet
Author: User

A very good registration machine implementation code, and the market popular Istar menu.

Import Cocoa

Extension String {

Func md5numeric (), String? {

Let data = (self asNSString). datausingencoding (nsutf8stringencoding)
Let result = Nsmutabledata (Length:int (cc_md5_digest_length))
Let resultbytes = unsafemutablepointer<cunsignedchar> (result.mutablebytes)

ifdata = = Nil {
returnNil
}

CC_MD5 (data!. Bytes, Cc_long (data!. Length), resultbytes)

Let buffer = unsafebufferpointer<cunsignedchar> (start:resultbytes, Count:result.length)
var hash = nsmutablestring ()
var numerichash = nsmutablestring ()

forIinchBuffer {
Hash.appendformat ("%02x"I
}

forIinch0... hash.length-1{
Numerichash.appendformat ("%d", Hash.characteratindex (i))
}

Numerichash.replaceoccurrencesofstring (
"0",
Withstring:"",
Options:NSStringCompareOptions.CaseInsensitiveSearch,
Range:nsmakerange (0, Numerichash.length)
)


ifNumerichash.length < -{
returnNil
}

Let numerichashstring:string = Numerichash

Let StartIndex = Advance (Numerichashstring.startindex,5)
Let EndIndex = Advance (StartIndex,8)
Let range = Range (Start:startindex, End:endindex)

returnNumerichashstring[range]
}

}

Let ApplicationName ="IStat Menu 5.01"

Let pool ="0123456789"
LetConst="43917202"

classAppdelegate:nsobject, Nsapplicationdelegate {

Func fun (), String {
Let seed =0x39* Arc4random_uniform (175)
returnString (format:"%04d", seed)
}

@IBAction func Generate (Sender:anyobject) {

var seed =""
var saltseed =""
forIinch0...7{
Let C = pool[advance (Pool.startindex, Int (Arc4random_uniform (Ten)))]
Seed.append (c)
Saltseed.append (c)
Saltseed.append (Const[Advance (Const. StartIndex, i)])
}

Let checksum = Saltseed.md5numeric ()

ifChecksum = = Nil {
return
}

var result =""
Result.append (checksum![ Advance (checksum!. StartIndex,3)])
Result.append (Seed[advance (Seed.startindex,0)])
Result.append (Seed[advance (Seed.startindex,4)])
Result.append (checksum![ Advance (checksum!. StartIndex,7)])
Result + ="-"
Result.append (checksum![ Advance (checksum!. StartIndex,6)])
Result.append (checksum![ Advance (checksum!. StartIndex,4)])
Result.append (Seed[advance (Seed.startindex,2)])
Result.append (checksum![ Advance (checksum!. StartIndex,5)])
Result + ="-"
Result.append (Seed[advance (Seed.startindex,1)])
Result.append (Seed[advance (Seed.startindex,3)])
Result.append (checksum![ Advance (checksum!. StartIndex,1)])
Result.append (Seed[advance (Seed.startindex,5)])
Result + ="-"
Result.append (checksum![ Advance (checksum!. StartIndex,0)])
Result.append (Seed[advance (Seed.startindex,6)])
Result.append (Seed[advance (Seed.startindex,7)])
Result.append (checksum![ Advance (checksum!. StartIndex,2)])
Result + ="-"
Result + = Fun ()

Textfield.stringvalue = result
}

}

The implementation of the keygen is as follows (Istarmenu CORE Keygen)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.