updated crypto definitions to use buffers