반응형
Array to Data :
let arr: [UInt32] = [32, 4, UInt32.max]
let data = Data(buffer: UnsafeBufferPointer(start: arr, count: arr.count))
print(data) // <20000000 04000000 ffffffff>
Data to Array :
var arr2 = Array<UInt32>(repeating: 0, count: data.count/MemoryLayout<UInt32>.stride)
_ = arr2.withUnsafeMutableBytes { data.copyBytes(to: $0) }
print(arr2) // [32, 4, 4294967295]
2020/05/25 - [분류 전체보기] - UserAgent 추가
2020/05/25 - [iOS/Swift] - RSA 암호화 / 복호화
2020/05/25 - [iOS/Swift] - Base64 인코딩/디코딩
2020/05/19 - [AI/Algorithm] - Generic algorithm
2020/05/19 - [AI/Algorithm] - neural network
2020/05/19 - [AI/Algorithm] - minimax full search example
2020/05/19 - [AI/Algorithm] - minimax, alpha-beta pruning
2020/05/19 - [iOS/Tips] - Bitbucket Carthage 사용
2020/05/19 - [iOS/Jailbreak] - Fridump 사용법 (3/3) - 메모리 덤프
2020/05/19 - [iOS/Jailbreak] - Fridump 사용법 (2/3) - Mac OS X 환경 구축
2020/05/19 - [iOS/Jailbreak] - Fridump 사용법 (1/3) - iOS디바이스 환경 구축
2020/05/19 - [iOS/Jailbreak] - Fridump, Tcpdump, OpenSSL Quick Guide
2020/05/19 - [OS/Mac OS X] - gdb 사용
반응형
'개발 > iOS' 카테고리의 다른 글
NSString <-> CBUUID 변환 (0) | 2020.05.29 |
---|---|
SEED 블록암호 알고리즘 CBC (Cipher Block Chaining) 예제 (1/2) (0) | 2020.05.28 |
UserAgent 변경/추가 (0) | 2020.05.25 |
RSA 암호화 / 복호화 (0) | 2020.05.25 |
Base64 인코딩/디코딩 (0) | 2020.05.25 |