Latest 1.0.9
Homepage https://github.com/daisuke-t-jp/MurmurHash-Swift
License MIT
Platforms ios 10.0, osx 10.12, tvos 12.0, requires ARC
Authors

MurmurHash-Swift

Platform
Language Swift%204.2
Cocoapods
Carthage compatible
SwiftPM compatible
Build Status

Introduction

MurmurHash framework in Swift.
A framework includes MurmurHash3’s x86_32/x86_128/x64_128 functions.

Reference :

Requirements

  • Platforms
    • iOS 10.0+
    • macOS 10.12+
    • tvOS 12.0+
    • Linux
  • Swift 4.2+

Installation

CocoaPods

use_frameworks!

target 'target' do
pod 'MurmurHash-Swift'
end

Carthage

github "daisuke-t-jp/MurmurHash-Swift"

Swift Package Manager

import PackageDescription

let package = Package(
    name: "YOUR_PACKAGE_NAME",
    targets: [],
    dependencies: [
        .package(url: "https://github.com/daisuke-t-jp/MurmurHash-Swift.git", from: "1.0.0")
    ]
    targets: [
        .target(
            name: "YOUR_TARGET_NAME",
            dependencies: ["MurmurHash-Swift"]),
    ]
)

Usage

Import framework

import MurmurHash_Swift

Generate Hash

let hash_x86_32 = MurmurHash3.x86_32("Hello World!") // if using seed, e.g. "MurmurHash3.x86_32("Hello World!", seed: 0x7fffffff)"
// hash_x86_32 -> 0xdc09357d

let hash_x86_128 = MurmurHash3.x86_128("Hello World!") // if using seed, e.g. "MurmurHash3.x86_128("Hello World!", seed: 0x7fffffff)"
// hash_x86_128.h1 -> 0x6bee9883
// hash_x86_128.h2 -> 0xeb1be4f5
// hash_x86_128.h3 -> 0x9dfb7172
// hash_x86_128.h4 -> 0xae3fbea9

let hash_x64_128 = MurmurHash3.x64_128("Hello World!") // if using seed, e.g. "MurmurHash3.x64_128("Hello World!", seed: 0x7fffffff)"
// hash_x64_128.h1 -> 0x80025454af3196b2
// hash_x64_128.h2 -> 0xe57813856f452fa6

Latest podspec

{
    "name": "MurmurHash-Swift",
    "version": "1.0.9",
    "summary": "MurmurHash framework in Swift.",
    "description": "MurmurHash framework in Swift.nA framework includes MurmurHash3's x86_32/x86_128/x64_128 functions.",
    "homepage": "https://github.com/daisuke-t-jp/MurmurHash-Swift",
    "screenshots": "https://raw.githubusercontent.com/daisuke-t-jp/MurmurHash-Swift/master/doc/header.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "daisuke-t-jp": "[email protected]"
    },
    "platforms": {
        "ios": "10.0",
        "osx": "10.12",
        "tvos": "12.0"
    },
    "source": {
        "git": "https://github.com/daisuke-t-jp/MurmurHash-Swift.git",
        "tag": "1.0.9"
    },
    "source_files": "Sources/MurmurHash/*.{swift}",
    "swift_version": "4.2",
    "requires_arc": true
}

Pin It on Pinterest

Share This