Skip to content
Snippets Groups Projects
Select Git revision
  • cfb01d0a367ccc6168ce57a96b5acf69585a63bb
  • develop default protected
  • onion-restart
3 results

onion_binary.md

Blame
  • user avatar
    Alexander Færøy authored
    cfb01d0a
    History

    Module onion_binary

    Binary Utility API.

    Authors: Alexander Færøy (ahf@0x90.dk).

    Description

    This module contains various utility functions that are found useful when working with binaries.

    Function Index

    fingerprint/1 Get the fingerprint of a given binary.
    fingerprint/2 Apply the hash algorithm to the input and get the fingerprint.
    trim/2

    Function Details

    fingerprint/1

    
    fingerprint(Data) -> binary()
    • Data = binary()

    Get the fingerprint of a given binary.

    fingerprint/2

    
    fingerprint(Hash, Data) -> binary()

    Apply the hash algorithm to the input and get the fingerprint.

    trim/2

    
    trim(Subject, Pattern) -> Result
    • Subject = binary()
    • Pattern = binary() | [binary()]
    • Result = binary()