| |
|
|
Findus | I have a code Internet found the by me because of fehlern but not running and the have I new written. so can Text very sure code. CompileMarkSeparationdef cryptacquirecontext(5) !"Advapi32.dll","CryptAcquireContextA"
def cryptcreatehash(5) !"Advapi32.dll","CryptCreateHash"
def cryptdecrypt(6) !"Advapi32.dll","CryptDecrypt"
def cryptderivekey(5) !"Advapi32.dll","CryptDeriveKey"
def cryptdestroyhash(1) !"Advapi32.dll","CryptDestroyHash"
def cryptdestroykey(1) !"Advapi32.dll","CryptDestroyKey"
def cryptencrypt(7) !"Advapi32.dll","CryptEncrypt"
def crypthashdata(4) !"Advapi32.dll","CryptHashData"
def cryptreleasecontext(2) !"Advapi32.dll","CryptReleaseContext"
proc encode
parameters txt$,schl$
declare erg$,hh&,hk&,hp&,len&,puffer#
cryptacquirecontext(addr(hp&),0,0,1,0)
len&=len(txt$)
dim puffer#,len&+2+128
string puffer#,0=txt$
if hp&
cryptcreatehash(hp&,32771,0,0,addr(hh&))
if hh&
crypthashdata(hh&,addr(schl$),len(schl$),0)
cryptderivekey(hp&,26625,hh&,1,addr(hk&))
if hk&
cryptencrypt(hk&,0,1,0,puffer#,addr(len&),len(txt$)*2+128)
cryptdestroykey(hk&)
endif
cryptdestroyhash(hh&)
endif
cryptreleasecontext(hp&,0)
endif
erg$=encode64(char$(puffer#,0,len&))
dispose puffer#
return erg$
endproc
proc decode
parameters txt$,schl$
declare erg$,hh&,hk&,hp&,len&,puffer#,tmp$
cryptacquirecontext(addr(hp&),0,0,1,0)
tmp$=decode64(txt$)
len&=len(tmp$)
dim puffer#,len&*2+128
string puffer#,0=tmp$
if hp&
cryptcreatehash(hp&,32771,0,0,addr(hh&))
if hh&
crypthashdata(hh&,addr(schl$),len(schl$),0)
cryptderivekey(hp&,26625,hh&,1,addr(hk&))
if hk&
if cryptdecrypt(hk&,0,1,0,puffer#,addr(len&))
erg$=string$(puffer#,0)
endif
cryptdestroykey(hk&)
endif
cryptdestroyhash(hh&)
endif
cryptreleasecontext(hp&,0)
endif
dispose puffer#
return erg$
endproc
print decode(encode("INHALT","PASSWORT"),"PASSWORT")
waitinput
|
| 1 kB | 0,99 € inkl. Tax. no Shipping fee | | item: | DE-9277 | | Bezeichnung: | crypt.exe | | Version: | 1 | | Kurzbeschreibung: | crypt.exe | | Hochgeladen: | 09/08/14 | | | | Download |
|
|
| |
|
|
|
| functions by me super. |
|
|
| |
|
|