Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Prog collabrative challange

Name: Anonymous 2011-03-11 3:42

Prog collaborative challange: make hax function for hashing.
Take code, modify it, post it.

Usage of elliptecal curves, primes, sboxes are all allowed. Changning languages is allowed.
Inventing new languages is allowed.

I start with simple

uint32_t hax(uint8_t* anus, size_t anus_depth)
{
     unsigned dildo;
     uint32_t vipper = 0x9011;
     for(dildo=0;dildo<anus_depth;++dildo){
       vipper ^= (vipper<< 8) | anus[dildo];
     }
     return vipper;    
}

Name: Anonymous 2011-03-12 7:30

We (the SUSSIX dev team (Me)) propose this as the final version.

;;; ;;;
;;; @file hash.asm
;;; @brief create a hash from a line of text
;;;
;;; @assemble    nasm -f elf -Ox hash.asm
;;; @link    ld -s hash.o -o hash
;;; @clean    rm -f hash.o
;;;
;;; @author Gerald Jay Sussman (Massachvsetts Institvte of Technology)
;;;
;;; Copyright (C) 2011 Gerald Jay Sussman and the Massachvsetts
;;; Institvte of Technology. All rights reserved.
;;;
;;; The new BSD License is applied to this software, see LICENSE.txt
;;; ;;;

section    .bss
iobuf:    resb    32

section    .data
hash:    dd    0

section    .text
    global    _start

_start:
    pop    ecx
    pop    ebx

    dec    ecx
    test    ecx, ecx
    jz    .fin

.argvloop:
    pop    ebx
    push    ecx

    xor    ecx, ecx
    mov    eax, [ebx]
    shl    eax, 7
.inner:
    mov    cl, [ebx]
    test    cl, cl
    jz    .endinner

    mov    edx, 1000003
    mul    edx
    xor    eax, ecx
    inc    ebx
    jmp    .inner
.endinner:
    mov    ecx, [hash]
    add    ecx, eax
    mov    [hash], ecx

    pop    ecx
    loop    .argvloop
.fin:
    call    print_unsigned32
    mov    al, 0x0A
    call    print_char

    mov    eax, 1
    mov    ebx, 0
    int    0x80

;;; Snip from the SUSSIX corelibs
print_unsigned32:
    pushad
    lea    ecx, [iobuf + 32]
.loop:
    dec    ecx

    xor    edx, edx
    mov    ebx, 10
    div    ebx

    add    dl, 0x30
    mov    [ecx], dl

    test    eax, eax
    jz    .ret

    jmp    .loop
.ret:
    mov    eax, 4
    mov    ebx, 1
    lea    edx, [iobuf + 32]
    sub    edx, ecx
    int    0x80
    popad
    ret

print_char:
    pushad

    mov    [iobuf], al
    mov    eax, 4
    mov    ebx, 1
    mov    ecx, iobuf
    mov    edx, 1
    int    0x80

    popad
    ret

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List