New xor-based encryption API