ixhash

package module
v0.0.0-...-58bab36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2018 License: Apache-2.0, BSL-1.0 Imports: 6 Imported by: 0

README

ixhash

GoDoc

Package ixhash implements the iXhash fuzzy e-mail hashing algorithms and provides facilities for checking iXhash digests against DNS lists.

Note: Not necessarily compatible with the SpamAssassin plugin. This is a bug.

Installation

go get cgt.name/pkg/ixhash

License

Copyright 2016 Christoffer G. Thomsen. Distributed under the Boost Software License, Version 1.0.

The iXhash digest algorithms were adapted from the iXhash SpamAssassin plugin by Dirk Bonengel, published under the Apache License version 2.0.

See file LICENSE for details.

Documentation

Overview

Package ixhash implements the iXhash fuzzy e-mail hashing algorithms and provides facilities for checking iXhash digests against DNS lists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(msg []byte) [3]string

All computes all three hashes of the msg, which should be the body of an e-mail (no headers). All returns an array where the FirstHash result is in at index 0, the SecondHash is at index 1, and the ThirdHash is at index 2. If a hash could not be computed, it will be an empty string.

func FirstHash

func FirstHash(msg []byte) string

FirstHash computes the first iXhash digest. FirstHash mutates the provided msg []byte. FirstHash requires that the message contain at least 20 spaces/tabs and at least two newlines.

func Lookup

func Lookup(zone, digest string) (bool, error)

func SecondHash

func SecondHash(msg []byte) string

SecondHash computes the second iXhash digest. SecondHash mutates the provided msg []byte.

func ThirdHash

func ThirdHash(msg []byte) string

ThirdHash computes the third iXhash digest. ThirdHash does not mutate the provided msg []byte. ThirdHash requires that the message contain at least eight consecutive non-space characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL