Skip to content
Snippets Groups Projects
Commit 649bfec0 authored by cleemy desu wayo's avatar cleemy desu wayo
Browse files

Modify: add new param_method "copy", "rev", and "REV"

This commit adds new param_method "copy", "rev", and "REV".

It may be possible to express Bitcoin double-hash using the
"REV" introduced this time and the "R" introduced in commit
057fa359.

:KRGS0.1:(s256,s,1)(s256,R,1)(REV,r,1)

The new three param_method "copy", "rev", and "REV" require
caution as they destroy the structure of the KRGS code.
For example, the following will not only cause an infinite
loop, but will also cause the KRGS code to grow larger and
larger.

$ ./koregusu.rb -e ':KRGS0.1:(copy,s,1)' --source="(copy,s,2)"

This commit is related to 057fa359.
parent 057fa359
Branches main
No related tags found
No related merge requests found
#!/usr/bin/env ruby
#
# ==========================================================================
# koregusu0.1 -- version 0.0.99.20250906.3
# koregusu0.1 -- version 0.0.99.20250906.4
#
# written by cleemy desu wayo / Licensed under CC0 1.0
#
......@@ -90,6 +90,12 @@ class KRGS
new_checksum = Digest::SHA256.hexdigest(key_str)
when "s512"
new_checksum = Digest::SHA512.hexdigest(key_str)
when "copy"
new_checksum = key_str
when "rev"
new_checksum = key_str.reverse
when "REV"
new_checksum = key_str.scan(/.{1,2}/).reverse.join
end
new_param = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment