Methods and systems thereof for providing security of information in a computer system are described. The information is received in the user space defined according to the operating system executed by the computer system. An encode system call is used to copy the information to the kernel space defined according to the operating system. The information may also be encrypted in response to the encode system call. The information can then be cleared from user space. A decode system call causes the information to be returned to user space. If the information is encrypted, the information is also decoded in response to the decode system call. As a result, the amount of time that the information is accessible outside of kernel space is reduced.