Update res.c

Added support to security operations