The oe-encode Reference Manual

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

The oe-encode Reference Manual

This is the oe-encode Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 05:27:43 2022 GMT+0.

Table of Contents


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.


2 Systems

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


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

2.1 oe-encode

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

Author

Matthew Stickney <mtstickney@gmail.com>

License

CC0 1.0 Public Domain

Dependency

babel (system).

Source

oe-encode.asd.

Child Component

encode.lisp (file).


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   [Contents][Index]

3.1.1 oe-encode/oe-encode.asd

Source

oe-encode.asd.

Parent Component

oe-encode (system).

ASDF Systems

oe-encode.


3.1.2 oe-encode/encode.lisp

Source

oe-encode.asd.

Parent Component

oe-encode (system).

Packages

oe-encode.

Public Interface
Internals

+magic-numbers+ (special variable).


4 Packages

Packages are listed by definition order.


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

4.1 oe-encode

Source

encode.lisp.

Use List

common-lisp.

Public Interface
Internals

+magic-numbers+ (special variable).


5 Definitions

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


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

5.1 Public Interface


5.1.1 Ordinary functions

Function: hash-bytes (bytes)
Package

oe-encode.

Source

encode.lisp.

Function: hash-string (string &key encoding)
Package

oe-encode.

Source

encode.lisp.

Function: hash-string->string (string &key in-encoding out-encoding)
Package

oe-encode.

Source

encode.lisp.


5.2 Internals


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

5.2.1 Special variables

Special Variable: +magic-numbers+
Package

oe-encode.

Source

encode.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.3 Variables

Jump to:   +  
S  
Index Entry  Section

+
+magic-numbers+: Private special variables

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

Jump to:   +  
S