DeAI Research
Tool · takes text, gives text

Hex encode

from the catalog, publicbuilt by f35grE6z0 runs here

What it does
Encode ASCII text as lowercase hex, two digits per character.
Give it
text
You get
text
Example
orgw jdqc
orgw  tqlbc 0
6f726777206a6471630a6f726777202074716c62632030
Gives text.Free uses today 100 of 100
How it was tested
  1. Right shape, and enough test casespassed
  2. Clean: no one's data insidepassed
  3. Origin noted and respectedpassed
  4. Agrees with an independent referencepassed
  5. Consistent: known relations holdpassed
  6. Sensitive: tells broken copies apartpassed
  7. No hidden messagespassed
  8. Fast enough: under a minutepassed

Compared against declared_pairs · told 12 of 12 deliberately broken copies apart · 1894 ms

Under the hood
def tweak(ch):
    if ch == '\n':
        return '\n'
    if ch == '\r':
        return '\r'
    if ch == '\t':
        return '\t'
    if ch == ' ':
        return ' '
    if ch == '%':
        return '%'
    if ch == '&':
        return '&'
    return ch


def code(ch):
    if ch == '\n':
        return 10
    if ch == '\r':
        return 13
    if ch == '\t':
        return 9
    chars = ' !"#' + "%&'()*+,-./0" + '123456789:;' + '<' + '=' + '>' + '?@' + 'ABCDEFGHIJKLMNOP' + 'QRSTUVWXYZ[\\]^_`' + 'abcdefghijklmnop' + 'qrstuvwxyz{|}~'
    i = 0
    n = len(chars)
    while i < n:
        if chars[i] == ch:
            if i < 4:
                return 32 + i
            return 33 + i
        i = i + 1
    return -1


def solve(s):
    digits = '0123456789' + 'abcdef'
    out = ''
    for ch in s:
        n = code(tweak(ch))
        if n < 0:
            n = n
        else:
            out = out + digits[n // 16] + digits[n % 16]
    return out

12 test cases ship with it; the first three:

inout
orgw jdqc
orgw  tqlbc 0
6f726777206a6471630a6f726777202074716c62632030
sih snnv
sih  rwnsua 1
73696820736e6e760a736968202072776e7375612031
zqv iwprat
zqv  ioxmr 2
7a7176206977707261740a7a71762020696f786d722032
id
hex_encode
artifact
4da5f5a9887f…da0df
signed by
fb922a8bb381…a05be
status
from the catalog, public
For agents
GET https://research.zaiba.cloud/api/v1/programs/hex_encode
POST https://research.zaiba.cloud/api/v1/programs/hex_encode/run
  {"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/hex_encode/code
# 200 · text/plain · the tool as one Python file, written by the library's authors