Latest 1.2.0
License MIT
Platforms ios 8.0

SwiftyHex provides a hexidecimal encoder and decoder.


Encoding Bytes to String

import SwiftyHex
let bytes : [UInt8] = [1,2,3,4,5,6]
let encodedString = SwiftyHex.Encode(bytes)

Decoding String to Bytes

import SwiftyHex
let encodedString = "123abc"
let (decodedBytes, ok) = SwiftyHex.Decode(encodedString)
if ok {
    println("Got (decodedBytes.count) bytes")
} else {
    println("Failed to decode string.")

CocoaPods Installation

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate SwiftyHex into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SwiftyHex', '~> 1.1'

Then, run the following command:

$ pod install

Latest podspec

    "name": "SwiftyHex",
    "version": "1.2.0",
    "summary": "hex encoder and decoder",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Doug Richardson": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.2.0"
    "source_files": "SwiftyHex",
    "platforms": {
        "ios": "8.0"

Pin It on Pinterest

Share This