[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Encryption module\n=================\n\n### TIPCommon.encryption.decrypt\n\n`TIPCommon.encryption.decrypt(enc_data: bytes, key: str)→ str`\n\nDecrypts data with the provided key.\n\n#### Parameters\n\n#### Returns\n\nThe decrypted message.\n\n#### Return type\n\n`str`\n\n### TIPCommon.encryption.decrypt_email\n\n`TIPCommon.encryption.decrypt_email(smime_email_config: SmimeEmailConfig, logger: ScriptLogger)→ Message`\n\nChecks if an email message is encrypted or signed and decrypts or verifies it.\n\n#### Parameters\n\n#### Returns\n\nA Message object with a decrypted or verified message.\n\n#### Return type\n\n`email.message.Message`\n\n### TIPCommon.encryption.encrypt\n\n`TIPCommon.encryption.encrypt(data: str, key: str)→ bytes`\n\nEncrypts data with the provided key.\n\n#### Parameters\n\n#### Returns\n\nThe encrypted message.\n\n#### Return type\n\n`bytes`\n\n### TIPCommon.encryption.get_private_key\n\n`TIPCommon.encryption.get_private_key(password: str)→ bytes`\n\nDerives a private key from a password.\n\n#### Parameters\n\n#### Returns\n\nA byte string.\n\n#### Return type\n\n`bytes`\n\n**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/google-security-operations-2)"]]