Completed implementation of utility functions to encrypt and decrypt blobs.