:: Incomplete project idea. Setup to allow unconventional methods of passwording tamper detection w/o encryption. Β Meant to be light & lean when it use.
:: conceptually transferable to other programming languages & somewhat universal.
@echo off
set VAL=A
set NUM=%1
set MAT=0
set FMAT=0
set DGC=0
set MLC=2
set CTL=0
set HLD=2
set CHK=0
set CNT=0
If %NUM% GTR 1 set CHK=1
if %NUM% EQU 1 (set VAL=%VAL%1&& goto Derp)
if %NUM% EQU 0 (set VAL=%VAL%0&& goto Derp)
if %NUM% LSS 0 (goto OOF&& echo Invalid input)
:Big
set /a CNT=%CNT%+1
if %NUM% GTR %HLD% (set /a HLD=%HLD%*2&& goto Big)
if %NUM% EQU %HLD% set MAT=1
if %NUM% LSS %HLD% set /a HLD=%HLD%/2
if %MAT% EQU 1 goto MLoop
:Loop
set VAL=%VAL%1
set /a NUM=%NUM%-%HLD%
:Zed
set /a HLD=%HLD%/2
if %HLD% GTR %NUM% (set VAL=%VAL%0&& goto Zed)
if %NUM% EQU 1 (set VAL=%VAL%1&& goto Derp)
if %NUM% EQU 0 (set VAL=%VAL%0&& goto Derp)
if %HLD% LSS %NUM% goto Loop
:MLoop
set /a DGC=%DGC%+1
if %MLC% LSS %NUM% (set /a MLC=%MLC%*2&& goto MLoop)
:DLoop
if %FMAT% EQU 0 (set VAL=%VAL%1) else (set VAL=%VAL%0)
set /a MLC=%MLC%/2
set FMAT=1
if %MLC% EQU 1 (set VAL=%VAL%0&& goto Derp)else (goto DLoop)
:Derp
set VAL=%VAL:~1%
echo %VAL%
:OOF
Comments
0 B
|π
/π