Code-Beispiel
AES
| Lizenz: | Erster Autor: | Letzte Bearbeitung: |
| k. A. | csde_rats | 02.02.2014 |
Zamaster hat den AES-Algorithmus in FB implementiert. (
Zum Thread)
Ihr könnt die Funktionen aes_encrypt und aes_decrypt zum einfachen Verschlüsseln mit dem AES Algorithmus verwenden.
Beispiel:
#include "AES.bas"
'declare function aes_encrypt (Text as string, Key as string) as string
'declare function aes_decrypt (Text as string, Key as string) as string
dim My as string = "Hallo" ' Zu verschlüsseln
dim MyK as string = "Welt!!!!!!!!!!!!" ' Der Key
dim MyC as string ' Das verschlüsselte
dim MyE as string ' Hier das entschlüsselte
print "Text:", My
print "Key:", MyK
MyC = aes_encrypt(My, MyK)
print "Encrypted:", MyC
MyE = aes_decrypt (MyC, MyK)
print "Decrypted:", MyE
sleep
end
| Attachments zum Code-Beispiel | |||||
|---|---|---|---|---|---|
|
| Zusätzliche Informationen und Funktionen | |||||||
|---|---|---|---|---|---|---|---|
|
|||||||



FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!
02.02.2014
Bearbeiten
Versionen