Skip to content

Commit

Permalink
add description to rabin modules
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Jun 21, 2023
1 parent d2041ca commit 542e539
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hash/rabin-gf2-polynomial.js
@@ -1,3 +1,14 @@
/**
* The idea of the Rabin fingerprint algorithm is to represent the binary as a polynomial in a
* finite field (Galois Field G(2)). The polynomial will then be taken "modulo" by an irreducible
* polynomial of the desired size.
*
* This implementation is inefficient and is solely used to verify the actually performant
* implementation in `./rabin.js`.
*
* @module rabin-gf2-polynomial
*/

import * as math from '../math.js'
import * as webcrypto from 'lib0/webcrypto'
import * as array from '../array.js'
Expand Down
7 changes: 7 additions & 0 deletions hash/rabin-uncached.js
@@ -1,3 +1,10 @@
/**
* It is not recommended to use this package. This is the uncached implementation of the rabin
* fingerprint algorithm. However, it can be used to verify the `rabin.js` implementation.
*
* @module rabin-uncached
*/

import * as math from '../math.js'
import * as buffer from '../buffer.js'

Expand Down
7 changes: 7 additions & 0 deletions hash/rabin.js
@@ -1,3 +1,10 @@
/**
* @module rabin
*
* Very efficient & versatile fingerprint/hashing algorithm. However, it is not cryptographically
* secure.
*/

import * as buffer from '../buffer.js'
import * as map from '../map.js'

Expand Down

0 comments on commit 542e539

Please sign in to comment.