
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
ibanizator calculates the iban for german accounts. The database that is used to convert a bank number to a BIC is taken from Deutsche Bundesbank.
Add this line to your application's Gemfile:
gem 'ibanizator'
To calculate the iban for some german accounts, just use this method:
ibanizator = Ibanizator.new
ibanizator.calculate_iban country_code: :de, bank_code: '12345678', account_number: '123456789'
In the current version the ibanizator gem only works for german accounts.
To validate the iban you need to check the length and after this check the checksum. For details please refer to the documentation online (e.g. Wikipedia).
This gem provides a simple validator for several contries. All countries that are listed in the Ibanizator::Iban::LENGTHS hash are supported at the moment.
iban = Ibanizator.iban_from_string("DE68 2105 0170 0012 3456 78")
iban.valid? # => true
The Ibanizator::Iban class provides some handy utility methods to query information about an iban.
iban = Ibanizator.iban_from_string("DE68 2105 0170 0012 3456 78")
iban.country_code # => :DE
# there is extended data for german ibans
iban.extended_data.bank_code # => "21050170"
iban.extended_data.account_number # => "12345678"
iban.extended_data.bic # => "NOLADE21KIE"
If you need to get a bank name, bank code or a bic from a german bank and you have either a BIC or a bank code there is a bank db.
# find a bank by BIC
bank_1 = Ibanizator.bank_db.bank_by_bic('MARKDEF1100')
bank_1.name # => 'BBk Berlin'
bank_1.bic # => 'MARKDEF1100'
bank_1.bank_code # => '10000000'
# find a bank by bank_code (de: Bankleitzahl)
bank_2 = Ibanizator.bank_db.bank_by_bank_code('100 000 00')
bank_2.name # => 'BBk Berlin'
bank_2.bic # => 'MARKDEF1100'
bank_2.bank_code # => '10000000'
bank_3 = Ibanizator.bank_db.bank_by_bank_code('10000000')
bank_3.name # => 'BBk Berlin'
bank_3.bic # => 'MARKDEF1100'
bank_3.bank_code # => '10000000'
bank_1 == bank_2 # => true
bank_2 == bank_3 # => true
bank_4 = Ibanizator.bank_db.bank_by_bic('OASPDE6AXXX')
bank_4 == bank_2 # => false
The code is availiable under the MIT-Licence
FAQs
Unknown package
We found that ibanizator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.