From 798fc61c021f721f5b5b19fb34973ab6e3d006a0 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 14 Feb 2018 09:42:07 +0100 Subject: [PATCH] #54 : AESEncrypt and Decrypt functions are now declared immutable #54 : AESEncrypt and Decrypt functions are now declared immutable --- encryption_package/src/AESDecrypt.cpp | 7 +++++++ encryption_package/src/AESEncrypt.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/encryption_package/src/AESDecrypt.cpp b/encryption_package/src/AESDecrypt.cpp index 898f022..9b4e91f 100644 --- a/encryption_package/src/AESDecrypt.cpp +++ b/encryption_package/src/AESDecrypt.cpp @@ -117,6 +117,13 @@ class AESDecryptFactory : public ScalarFunctionFactory const VerticaType &t = argTypes.getColumnType(0); returnType.addVarchar(t.getStringLength()); } + +public: + AESDecryptFactory() + { + vol = IMMUTABLE; + } + }; RegisterFactory(AESDecryptFactory); diff --git a/encryption_package/src/AESEncrypt.cpp b/encryption_package/src/AESEncrypt.cpp index 69ccb72..93cf018 100644 --- a/encryption_package/src/AESEncrypt.cpp +++ b/encryption_package/src/AESEncrypt.cpp @@ -121,6 +121,13 @@ class AESEncryptFactory : public ScalarFunctionFactory // I believe it's faster than computing the length and round. returnType.addVarchar(t.getStringLength()+AES_BLOCK_SIZE); } + +public: + AESEncryptFactory() + { + vol = IMMUTABLE; + } + }; RegisterFactory(AESEncryptFactory);