I-Base64 Decoding

Ngethuluzi lokukhipha amakhodi i-Base64, ungakwazi ukunquma kalula idatha efakwe ikhodi ngendlela ye-Base64. Kuyini umbhalo wekhodi we-Base64? Yenzani i-Base64? Thola lapha.

Kuyini ukubethela kwe-Base64?

Kuyindlela yokubhala ngemfihlo eyakhiwe kuye ngokuthi uhlamvu ngalunye lumele inombolo, futhi ehlinzeka ngokugcina idatha ngokuyiguqulela ibe umbhalo. Umbhalo wekhodi we-Base64, okuyindlela yombhalo wekhodi esetshenziswa ikakhulukazi lapho kuthunyelwa okunamathiselwe kwi-imeyili; Inikeza ukuguqulwa kwedatha kanambambili ibe ifayela lombhalo kumazinga we-ASCII. Okokuqala, ngemva kokuchaza amaphuzu athile mayelana ne-Base64, sizokwenza i-Base64 encode futhi sinqume imisebenzi ngolimi lwe-C++.

Enye yezinjongo eziyinhloko zombhalo wekhodi we-base64 ukuvumela okunamathiselwe ukuthi kunamathiselwe kumameyili. Ngoba umthetho olandelwayo we-SMTP, osivumela ukuthi sithumele imeyili, awuyona inqubo efanelekile yokuthumela idatha kanambambili njengezithombe, umculo, amavidiyo, izinhlelo zokusebenza. Ngakho-ke, ngezinga elibizwa nge-MIME, idatha kanambambili ibhalwa ngekhodi ne-Base64 futhi ingathunyelwa ngephrothokholi ye-SMTP. Ngemva kokuba imeyili ithunyelwe, idatha Kanambambili ngakolunye uhlangothi ikhishwa ikhodi ngokuvumelana nezindinganiso ze-Base64 futhi iguqulelwe kufomethi edingekayo.

Umbhalo wekhodi we-Base64 ngokuyisisekelo uveza idatha enezimpawu ezihlukile. Lezi zimpawu ziwuchungechunge lwezinhlamvu ezihlukene ezingama-64. Igama elinikezwe umbhalo wekhodi selivele livela enombolweni yalezi zinhlamvu. Lezi zinhlamvu ezingama-64 zimi kanje.

Uma unaka izinhlamvu ezingenhla, zonke ziyizinhlamvu ezijwayelekile ze-ASCII ngakho-ke uhlamvu ngalunye lunokulingana kwezinombolo okuvezwa okulingana ne-ASCII. Isibonelo, okulingana ne-ASCII yohlamvu A ngu-65, kuyilapho okulingana nohlamvu a kungu-97. Kuthebula elingezansi, ukulingana kwezinhlamvu ezisekelweni ezihlukene, ikakhulukazi i-ASCII, kunikezwa.

I-Base64 iwuhlelo lokubhala ngekhodi olwakhelwe ukuvimbela ukulahleka kwedatha phakathi nokudluliswa kwedatha. Iningi lethu liyayazi njengendlela yokubethela ye-Base64, kodwa i-Base64 iyindlela yokubhala ikhodi, hhayi indlela yokubhala ngekhodi. Idatha ezobhalwa ngekhodi iqala ngokuhlukaniswa ngohlamvu ngohlamvu. Bese, okulingana kanambambili okungu-8-bit kohlamvu ngalunye kutholwa. Izinkulumo ze-8-bit ezitholiwe zibhalwa ngapha nangapha futhi zihlukaniswe ngamaqembu angu-6-bit. I-Base64 elingana neqembu ngalinye le-6-bit ibhaliwe futhi inqubo yombhalo wekhodi iyaqedwa. Emsebenzini wokukhipha ikhodi, kusetshenziswe okuphambene nemisebenzi efanayo.

Yenzani ukubethela kwe-Base64?

Kuyindlela ehlukile yokubhala ngemfihlo ekuvumela ukuthi ubhale ngemfihlo kokubili okwenziwayo kokudlulisela nokugcina.

Ungayisebenzisa kanjani i-base64 encryption?

Kopisha futhi unamathisele idatha ofuna ibethelwe engxenyeni efanele kwesokunxele sephaneli. Chofoza inkinobho eluhlaza "Umbuzo" kwesokudla. Ungakwazi ukufihla yonke idatha ngenxa yaleli thuluzi, lapho ungenza khona kokubili ukubethela nokubhala.

I-Base64 encryption logic

I-encryption logic iyinkimbinkimbi, kodwa njengenkulumo evamile, idatha ngayinye ehlanganisa izinhlamvu ze-ASCII ihunyushwa ibe amayunithi angu-64 ahlukene, amelwe izinombolo. Khona-ke lawa mayunithi aguqulwa esuka ku-8-bit, okungukuthi, izinkambu ze-byte kuya kwezingu-6-bit. Ngenkathi kwenziwa le nqubo yokuhumusha, ukuhunyushelwa ezimisweni ezisetshenziswa izinombolo ezihlukene ezingama-64 kwenzeka. Ngale ndlela, idatha iphenduka ibe isakhiwo esihluke ngokuphelele futhi esiyinkimbinkimbi.

Izinzuzo zokubethela ze-Base64

Isetshenziselwa ukuvikela idatha ekuhlaselweni kwangaphandle. Le ndlela yokubhala ngekhodi, ekhipha izinhlamvu eziyinkimbinkimbi ezingu-64 ezihlanganisa izinhlamvu nezinombolo ezinkulu nezincane, ikwandisa kakhulu ukuphepha.

Ukubethela kwe-Base64 kanye nokuqaqwa

Esigabeni sokuqala, inketho ethi "bethela" imakwa ngakwesokudla kwephaneli. Idatha esethwe ngale ndlela ibethelwa uma inkinobho ethi "Umbuzo" ichofozwa. Ukuze ususe ukubethela, udinga ukuchofoza embhalweni othi "Bethela" bese uchofoza umbhalo othi "Decrypt" ohlwini. Bese, ngokuchofoza inkinobho ethi "Query", i-base64 decryption nayo ingenziwa.

Ngabe i-base64 encryption isebenza kanjani?

Kulula kakhulu ukusebenzisa lolu hlelo, olusekelwe ekuguquleni nasekugcineni izinhlamvu ze-ASCII zibe izinhlamvu ezihlukene ezingama-64.

Isetshenziswa kuphi i-Base64?

Umbhalo wekhodi we-Base64 usekelwe ekuguqulweni kwedatha, ngokuvamile esesimweni seyunithi yezinhlamvu, ibe izinkulumo zezinombolo neziyinkimbinkimbi. Ingenye yezindlela ezinhle kakhulu zokuvikela nokugcina idatha.