Key bank account number
key bank account number (bank account number = Bank account number) consists of 2 digits between 01 and 97 which supplements a number of bank account. It allows, by a algorithm, to check the validity of the account number.
Calculation algorithm of key bank account number
The number of bank account to format bank account number comprises 23 digits and can break up as follows:
where is the Code banks, the Code counter, the Account number and key bank account number.
Actually, the Account number can be made up at the same time of figures and letters. In order to apply the calculation algorithm, it is thus necessary, if necessary, to convert the letters into figures according to the table of correspondence below:
Then, the key is calculated so that the remainder of the whole division of by 97 is null and that either ranging between 1 and 97, or:
In particular, we have:
A simple formula to calculate is then:
Calculation algorithm which functions with entireties 32 bits
The number which poses problem is the account number, which, because of its eleven figures, does not place in an entirety 32 bits, even less when it is multiplied by three. The solution is to separate it in two numbers, the account number breaks up then as follows:
Thus, the account number is broken up into C and D , having respectively five and six digits. The formula becomes then:
The simple formula to calculate becomes:
It is calculable more using the whole type running in our current systems, i.e. the entirety 32 bits. An implementation out of C would be:
int cle_RIB (int B, int G, int D, int c)
{
return 97 - ((89 * B + 15 * G + 76 * D + 3 * c) % 97);
}
External bonds
-
Calculation in line of key bank account number and implementation in PHP
| Random links: | Villenave-in Ornon | San Francisco de MacorĂs | La Poste Switzerland | Jeremy Manning | Gnaeus Cornelius Dolabella | d'Harleville_de_Collin |