Documentation ¶
Index ¶
- func ByN(ct string, n int) string
- func ByN1(ct string, n int) string
- func Condense(str string) string
- func Condense1(str string) string
- func Condense2(str string) string
- func Condense3(str string) string
- func Condense4(str string) string
- func Condense5(str string) string
- func Dup(a []byte) []byte
- func Expand(src []byte) []byte
- func ExpandBroken(src []byte) []byte
- func FixDouble(str string, fill byte) string
- func Shuffle(key, alphabet string) string
- func Shuffle1(key, alphabet string) string
- func Shuffle2(key, alphabet string) string
- func ToNumeric(key string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Shuffle ¶
# Form an alphabet formed with a keyword, re-shuffle everything to # make it less predictable (i.e. checkerboard effect) # # Shuffle the alphabet a bit to avoid sequential allocation of the # code numbers. This is actually performing a transposition with the word # itself as key. # # Regular rectangle # ----------------- # Key is ARABESQUE condensed into ARBESQU (len = 7) (height = 4) # Let word be ARBESQUCDFGHIJKLMNOPTVWXYZ/- # # First passes will generate # # A RBESQUCDFGHIJKLMNOPTVWXYZ/- c=0 0 x 6 # AC RBESQUDFGHIJKLMNOPTVWXYZ/- c=6 1 x 6 # ACK RBESQUDFGHIJLMNOPTVWXYZ/- c=12 2 x 6 # ACKV RBESQUDFGHIJLMNOPTWXYZ/- c=18 3 x 6 # ACKVR BESQUDFGHIJLMNOPTWXYZ/- c=0 0 x 5 # ACKVRD BESQUFGHIJLMNOPTWXYZ/- c=5 1 x 5 # ... # ACKVRDLWBFMXEGNYSHOZQIP/UJT- # # Irregular rectangle # ------------------- # Key is SUBWAY condensed info SUBWAY (len = 6) (height = 5) # # S UBWAYCDEFGHIJKLMNOPQRTVXZ/- c=0 0 x 5 # SC UBWAYDEFGHIJKLMNOPQRTVXZ/- c=5 1 x 5 # SCI UBWAYDEFGHJKLMNOPQRTVXZ/- c=10 2 x 5 # SCIO UBWAYDEFGHJKLMNPQRTVXZ/- c=15 3 x 5 # SCIOX UBWAYDEFGHJKLMNPQRTVZ/- c=20 4 x 5 # SCIOXU BWAYDEFGHJKLMNPQRTVZ/- c=0 0 x 4 # ... # SCIOXUDJPZBEKQ/WFLR-AG YHMNTV c=1 1 x 1 # SCIOXUDJPZBEKQ/WFLR-AGM YHNTV c=2 2 x 1 # SCIOXUDJPZBEKQ/WFLR-AGMT YHNV c=3 3 x 1 # SCIOXUDJPZBEKQ/WFLR-AGMTYHNV
Shuffle takes a word & alphabet and mixes them around - use strings.Builder
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.