Encrypt database with API?

Is there a way to encrypt an existing database via a Notes API? (Preferably Java, but C or another means would work if necessary). I would rather not create a new database.

Thanks in advance…