1. stock just tells the Pawn compiler to see if the function is used. If it isn't, it doesn't get added to the compiled script. public is pretty much the same as stock, except it's always compiled in and can be accessed from any script that includes it.
2. dutils.inc does not have encryption. I'll work on a customized SHA-256 implementation later. The SA:MP forum probably has encryption functions too.