Not sure I understand your question exactly... but probably you should look at the crypt library (openssl, nss, mscrypto, ...) for the functionality you need. Aleksey