Adding bank details to the contact through API

Adding bank details to the contact through API

How to add bank-related information to the contact while creating it using API? The account number needs to be encrypted before sending it through API but not sure how to encrypt and get those values. Please guide me in this.