The oe-encode Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The oe-encode Reference Manual

This is the oe-encode Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:22:22 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

* Introduction
  This is a port of Pieter van Ginkel's C# [[https://github.com/pvginkel/ProgressEncode][implementation]] of the
  =ENCODE()= hash function from Progress OpenEdge. To paraphrase
  Pieter: Progress has declined to make the algorithm for =ENCODE()=
  public, which is problematic when working with legacy systems
  (particularly where it's been used to hash user passwords). This
  implementation provides a compatible implementation of the hash
  function.

* API
** (hash-bytes bytes)
   Usage:
   : (hash-bytes #(1 2 3 4))
   : ;=> #(97 98 109 99 97 110 106 67 108 106 102 120 113 77 76 119)

   =HASH-BYTES= takes a sequence of =(unsigned-byte 8)= and returns a
   =(vector (unsigned-byte 8) 16)= that is the bytes of the resulting
   hash.

** (hash-string string &key encoding)
   Usage:
   : (hash-string "foo" :encoding :utf-8)
   : ;=> #(108 97 99 100 107 71 106 117 108 105 106 99 108 110 97 97)

   =HASH-STRING= uses =HASH-BYTES= to hash the input string after
   encoding it with the specified encoding. If =:encoding= is not
   supplied, =:iso-8559-1= is used.

** (hash-string->string string &key in-encoding out-encoding)
   Usage:
   : (oe-encode:hash-string->string "foo" :in-encoding :utf-8 :out-encoding :utf-8)
   : ;=> "lacdkGjulijclnaa"

   =HASH-STRING->STRING= works like =HASH-STRING= but decodes the
   result result into a string before returning it -- the Progress API
   operates on and returns strings, so this is likely to be the most
   convenient function for working with existing data. =:in-encoding=
   is used to encode the input before hashing and defaults to
   =:iso-8559-1=, =:out-encoding= is used to decode the resulting hash
   bytes as a string and defaults to the value of =:in-encoding=.

   Note that the =ENCODE()= algorithm ensures that output bytes are
   always in the range of alphabetic ASCII characters, so output
   encodings that are ASCII-compatible are preferrable.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 oe-encode

Author

Matthew Stickney <mtstickney@gmail.com>

License

CC0 1.0 Public Domain

Description

An implementation of the ENCODE() hash function from Progress OpenEdge.

Dependency

babel

Source

oe-encode.asd (file)

Component

encode.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 oe-encode.asd

Location

oe-encode.asd

Systems

oe-encode (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 oe-encode/encode.lisp

Parent

oe-encode (system)

Location

encode.lisp

Packages

oe-encode

Exported Definitions
Internal Definitions

+magic-numbers+ (special variable)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 oe-encode

Source

encode.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

+magic-numbers+ (special variable)


Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: hash-bytes BYTES
Package

oe-encode

Source

encode.lisp (file)

Function: hash-string STRING &key ENCODING
Package

oe-encode

Source

encode.lisp (file)

Function: hash-string->string STRING &key IN-ENCODING OUT-ENCODING
Package

oe-encode

Source

encode.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: +magic-numbers+
Package

oe-encode

Source

encode.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   O  
Index Entry  Section

F
File, Lisp, oe-encode.asd: The oe-encode<dot>asd file
File, Lisp, oe-encode/encode.lisp: The oe-encode/encode<dot>lisp file

L
Lisp File, oe-encode.asd: The oe-encode<dot>asd file
Lisp File, oe-encode/encode.lisp: The oe-encode/encode<dot>lisp file

O
oe-encode.asd: The oe-encode<dot>asd file
oe-encode/encode.lisp: The oe-encode/encode<dot>lisp file

Jump to:   F   L   O  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   H  
Index Entry  Section

F
Function, hash-bytes: Exported functions
Function, hash-string: Exported functions
Function, hash-string->string: Exported functions

H
hash-bytes: Exported functions
hash-string: Exported functions
hash-string->string: Exported functions

Jump to:   F   H  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
S  
Index Entry  Section

+
+magic-numbers+: Internal special variables

S
Special Variable, +magic-numbers+: Internal special variables

Jump to:   +  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   O   P   S  
Index Entry  Section

O
oe-encode: The oe-encode system
oe-encode: The oe-encode package

P
Package, oe-encode: The oe-encode package

S
System, oe-encode: The oe-encode system

Jump to:   O   P   S