pull/1/head
Avril 4 years ago
parent fe3dcf3681
commit cd9beecbc2
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -230,7 +230,7 @@
The strings generated by this library are meant to be pretty, not secure. It is not a secure way of representing a hash as many collisions are possible.
*** Digest algorithm
The kana algorithm is a 16-bit block digest that works as follows:
The kana algorithm is a 16-bit block digest that works as follows:
- The most and least significant 8 bits are each seperated into /Stage 0/ and /Stage 1/ each operating on the first and second byte respectively.
- Stage 0:
1. The byte is sign tested (bitwise ~AND~ =0x80=), store this as a boolean in /sign0/.
@ -246,9 +246,9 @@
3. If there was no value set from the sub table, the 2nd output character becomes the first output character from inputting the 2nd byte back through /Stage 0/ as the first byte.
- Concatenate both characters and move to the next 16-bit block.
Notes:
Notes:
- It is valid for a single iterator to produce between 0 and 2 characters but no more.
- If an input given to the algorithm that cannot be divided exactly into 16-bit blocks (i.e. one byte is left over), a padding byte of 0 is added as the 2nd byte to make it fit.
For more information see [[file:./src/mnemonic.rs][mnemonic.rs]].
For more information see [[file:./src/mnemonic.rs][mnemonic.rs]].
** License
GPL'd with love <3

Loading…
Cancel
Save