Module mochicode

Translate Erlang terms to and from a URL-safe encoding verifiable by MD5 MAC (Message Authentication Code).

Copyright © 2006 Mochi Media, Inc.

Authors: Bob Ippolito (bob@mochimedia.com).

Description

Translate Erlang terms to and from a URL-safe encoding verifiable by MD5 MAC (Message Authentication Code).

Data Types

iodata()

iodata() = iolist() | binary()

iolist()

iolist() = [char() | binary() | iolist()]

Function Index

decode/1Return the Erlang term originally encoded by encode/1 using the MAC to ensure its authenticity.
encode/1Return a URL-safe representation of the given term and a MAC to verify its authenticity.
mac/1Return the MD5 MAC for the given IoData.
rawdecode/1Return the binary() originally encoded by rawencode/1 using the MAC to ensure its authenticity.
rawencode/1Return a URL-safe representation of the given binary and a MAC to verify its authenticity.
url64_decode/1Return the original binary encoded in String via url64_encode/1.
url64_encode/1Return a URL safe representation of IoData.

Function Details

decode/1

decode(String) -> {ok, term()} | error

Return the Erlang term originally encoded by encode/1 using the MAC to ensure its authenticity.

encode/1

encode(Term) -> string()

Return a URL-safe representation of the given term and a MAC to verify its authenticity.

mac/1

mac(Binary::IoData) -> binary()

Return the MD5 MAC for the given IoData.

rawdecode/1

rawdecode(String) -> {ok, binary()} | error

Return the binary() originally encoded by rawencode/1 using the MAC to ensure its authenticity.

rawencode/1

rawencode(Binary) -> string()

Return a URL-safe representation of the given binary and a MAC to verify its authenticity.

url64_decode/1

url64_decode(String) -> binary()

Return the original binary encoded in String via url64_encode/1.

url64_encode/1

url64_encode(IoData) -> string()

Return a URL safe representation of IoData.


Generated by EDoc, Aug 9 2007, 13:20:00.