Are there examples of encryption in nature?
One example is in the development of the immune system. V(D)J recombination, antibody production, and T-cell receptor production generates a specific "key" that, in most cases, can only be bypassed by that individual's molecular inventory. 

In that sense, parasites, mutualists, and commensalists could be viewed as black, white, and grey hat hackers, respectively. 

Another example is the organism-specific tRNA synthase inventory and the matching tRNAs.