mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 14:01:20 -03:00
Revert "Add a function for getting a quick hash/checksum"
This reverts commit 6858abac04.
This was unintentional
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
function fish_fletcher16 --argument input -d "compute a fletcher 16 checksum"
|
||||
set -l sum1 0
|
||||
set -l sum2 0
|
||||
for char in (string split '' $input)
|
||||
set -l ordinal (printf %2u "'$char")
|
||||
math "($sum1 + $ordinal)" % 255 | read sum1
|
||||
math "($sum2 + $sum1)" % 255 | read sum2
|
||||
end
|
||||
math "bitor $sum1,$(math $sum2 '*' pow 2,8)"
|
||||
end
|
||||
Reference in New Issue
Block a user