# Malunga nokomelela kwe-IBAN0422

Njengoko kuyaziwa, i-IBAN yaseJamani iqulethe ikhowudi yelizwe (DE), idijithi yokutshekisha idijithi ezimbini (ngokwe- ISO 7064 ), ikhowudi yebhanki (i-8-digit) kunye nenombolo ye-akhawunti (kuquka inombolo ye-akhawunti engaphantsi, Iidijithi ezili-10, ezilahlekileyo zizaliswe ngooziro abakhokelayo) kwaye ke ngoko inamanani angama-22. Ukubala idijithi yokutshekisha, ebizwa ngokuba yi-BBAN (ikhowudi yebhanki kunye nenombolo ye-akhawunti) kunye nekhowudi yelizwe lamanani $$1314$$ yeJamani kunye nedijithi yokutshekisha $$00$$ ) zenziwe.

Umzekelo, ikhowudi yebhanki engu-21050170 kunye nenombolo ye-akhawunti 12345678 ibuyisela i-BBAN 210501700012345678, eyandisiweyo kunye nekhowudi yelizwe kunye nedijithi yetshekhi 00 emva koko isiphumo \ $$98 - (x \mod 97)$$ $$x = 210501700012345678131400$$ ye-8) iphi ngoku: $$98 - (x \mod 97)$$ . Akumangalisi ukuba oku kwahlulwe ngo $$97$$ . Njengelona nani likhulu elinokubakho elinemivo emibini ephambili, iqaphela amangeniso angachanekanga njengamasuntswana atshintshiweyo ngeyona ndlela inkulu enokwenzeka. Ngoku sibonisa ezi ngxelo zilandelayo:

1. Ukutshintsha idijithi enye ye-IBAN esebenzayo kuya kukhokelela kwi-IBAN engasebenziyo.
2. Ukutshintsha amasuntswana amabini e-IBAN esebenzayo kunokubangela i-IBAN esebenzayo.
3. Ukuba izikhundla ezibini ezahlukeneyo ze-IBAN ezisebenzayo ziyatshintshwa, i-IBAN engasebenziyo iyadalwa.
4. Ukuba utshintshanisa izikhundla ezimbini ezahlukeneyo ze-IBAN esebenzayo kabini, i-IBAN esebenzayo ingaphumela.

Vumela $$A = DE P_1 P_2 N_1 N_2 N_3 N_4 N_5 N_6 N_7 N_8 N_9 N_{10} N_{11} N_{12} N_{13} N_{14} N_{15} N_{16} N_{17} N_{18}$$ esebenzayo IBAN.

Emva koko $$A_B = N_1 N_2 N_3 N_4 N_5 N_6 N_7 N_8 N_9 N_{10} N_{11} N_{12} N_{13} N_{14} N_{15} N_{16} N_{17} N_{18} 131400$$ ehambelana nayo (yandiswe ngekhowudi yelizwe enenombolo-DE kunye nedijithi yokutshekisha $$00$$ ).

1. Guqula ngoku $$N_k$$, yi $$A_B^* = A_B + l \cdot 10^{24-k}$$ kunye $$1 \leq k \leq 18$$ kwaye $$(-1) \cdot N_k \leq l \leq 9-N_k \wedge l \neq 0$$. Nge $$P = 98 - (A_B \mod 97)$$ kodwa kunjalo $$P^* = 98 - \left((A_B + l \cdot 10^{24-k}) \mod 97\right)$$. Isebenza ngokubanzi kwi $$a \equiv a' \mod m, b \equiv b' \mod m$$: $$a + b \equiv a' + b' \mod m$$. Nge $$A_B \equiv R_1 \mod 97$$ kwaye $$l \cdot 10^{24-k} \equiv R_2 \mod 97$$ yi $$(A_B + l \cdot 10^{24-k}) \equiv R_1 + R_2 \mod 97$$. Kodwa ngoku kunjalo $$0 < R_2 < 97$$ kwaye njalo $$P^* = 98 - (R_1+R_2) \neq 98 - R_1 = P$$ kwaye ke ngoko $$P_1 \neq P_1^* \vee P_2 \neq P_2^*$$. Oku kushiya utshintsho olunye kuphela olunokwenzeka lwedijithi ukusuka $$P$$ ukuya $$P^* \neq P$$. Apha kodwa $$N_k$$ ihlala ingatshintshwanga, itshekhisum yenziwe $$P \neq P^*$$.
2. Ezi IBAN zimbini zilandelayo ziyasebenza:
\begin{align} A_1 = DE89207300\boldsymbol{\color{red}01}0012345674 \\ A_2 = DE89207300\boldsymbol{\color{red}98}0012345674 \end{align} Le kulapho uthatha khona inzuzo\$ , ukuba sonyuse amanani amabini ameleneyo kwi $$A_1$$ nge $$97$$ . Ukongeza, i-IBAN ayisebenzi ngokusesikweni kuphela, kodwa iikhowudi zebhanki ezisisiseko 20730001 kunye ne-20730098 zikhona ngokwenene.
3. Sizama kuqala, $$N_{k_1}$$ kwaye $$N_{k_2}$$ ukutshintsha. Okokuqala kukuba $$P = 98 - (A_B \mod 97)$$ njenge $$P^* = 98 - \left((A_B + l \cdot 10^{24-k_1} - l \cdot 10^{24-k_2}) \mod 97\right)$$ kunye $$l = N_{k_2} - N_{k_1}$$ kwaye $$1 \leq k_1, k_2 \leq 18$$. Ngoku kungenxa

$$\begin{array} {|c|c|} \hline k & R = 10^{24-k} \mod 97 \\ \hline 1 & 56 \\ \hline 2 & 25 \\ \hline 3 & 51 \\ \hline 4 & 73 \\ \hline 5 & 17 \\ \hline 6 & 89 \\ \hline 7 & 38 \\ \hline 8 & 62 \\ \hline 9 & 45 \\ \hline 10 & 53 \\ \hline 11 & 15 \\ \hline 12 & 50 \\ \hline 13 & 5 \\ \hline 14 & 49 \\ \hline 15 & 34 \\ \hline 16 & 81 \\ \hline 17 & 76 \\ \hline 18 & 27 \\ \hline \end{array}$$
$$\forall k_1 \neq k_2 \in \left\{ 1, \ldots, 18 \right\} : R_{k_1} \neq R_{k_2}$$. Kunjalo ke $$P \neq P^*$$. Ke kuya kuhlala kujongwe oko $$P_n$$ kwaye $$N_k$$ kunye $$1 \leq n \leq 2$$ kwaye $$1 \leq k \leq 18$$ urhwebo. Ingayiyo $$P = 98 - (A_B \mod 97)), (R_1 = (A_B \mod 97)$$, $$P^* = 98 - (A_B + (l \cdot 10^{24-k}) \mod 97)$$, $$R_2 = (A_B + (l \cdot 10^{24-k}) \mod 97)$$. Ekubeni thina $$A_B$$ ngeenxa zonke $$l \cdot 10^{24-k}$$ kufuneka sitshintshe $$P_1$$ okanye $$P_2$$ ngeenxa zonke $$-l$$, ngoko $$P$$ ngeenxa zonke $$-10^m l$$ kunye $$m \in \{0,1\}$$ utshintsho: Emva koko $$P^* = 98 - R_2$$ kodwa kwakhona $$P^* = P - 10^m l = 98 - R_1 - 10^m l$$, ngenxa yoko $$R_2 = R_1 + 10^m l,$$ kwaye njalo
$$((A_B \mod 97) + (l \cdot 10^{24-k} \mod 97)) \mod 97 = (A_B \mod 97) + 10^m l$$ Nangona kunjalo, le nxaki ayizange izaliseke, njengoko umbhalo olandelayo ubonisa:

See the Pen IBAN FORMULA CHECK by David Vielhuber (@vielhuber) on CodePen.

Oku kushiya kuphela utshintsho olunokwenzeka lwe $$P_1$$ kwaye $$P_2$$. Apha kodwa $$N_k$$ ihlala ingatshintshwanga, itshekhisum yenziwe $$P \neq P^*$$.
4. Ezi IBAN zimbini zilandelayo ziyasebenza:
\begin{align*}A_1 = DE\boldsymbol{\color{red}8}\boldsymbol{\color{green}3}20220800\boldsymbol{\color{red}1}000000\boldsymbol{\color{green}0}00 \\ A_2 = DE\boldsymbol{\color{red}1}\boldsymbol{\color{green}0}20220800\boldsymbol{\color{red}8}000000\boldsymbol{\color{green}3}00\end{align*} Apha, kwakhona, i-BIC 20220800 ikhona ngokwenene.
Emva