Microsoft Base Cryptographic

I need to encrypt numeric string using Microsoft Base Cryptographic.
The following type data will be encrypted.

a.)  social security
b.) bank account
c.) credit card numbers
d.) passwords
And then write the encrypted data to a MSSQL database.

The encryption needs to support different languages (i.e.)
a.) English
b.) Spanish
c.) Chinese
etc.

I do not won't to use the MSSQL encryption.

The problem with the following code is it sometimes produces a string not compatible with MSSQL.

Does anyone have any code that uses Microsoft Base Cryptographic and the encryption is always compatible with MSSQL.

Any help will be appreciated.

Thanks,
Phil
LVL 2
Phil ChapmanAsked:
Who is Participating?
All Courses

From novice to tech pro — start learning today.