An Adaptive Cryptographic Engine for IPsec Architectures