TomDoc for encrypt and decrypt methods