These functions don't really belong in the "crypto" file. I'm sure there's somewhere more appropriate for them...