Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/CRC-32/Swift/crc-32.swift
Normal file
7
Task/CRC-32/Swift/crc-32.swift
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import Foundation
|
||||
|
||||
let strData = "The quick brown fox jumps over the lazy dog".dataUsingEncoding(NSUTF8StringEncoding,
|
||||
allowLossyConversion: false)
|
||||
let crc = crc32(uLong(0), UnsafePointer<Bytef>(strData!.bytes), uInt(strData!.length))
|
||||
|
||||
println(NSString(format:"%2X", crc))
|
||||
Loading…
Add table
Add a link
Reference in a new issue