diff options
author | Reynold Xin <rxin@databricks.com> | 2016-02-19 22:44:20 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-02-19 22:44:20 -0800 |
commit | 6624a588c1b3b6c05fb39285bc6215102dd109c6 (patch) | |
tree | 75671732b5e2ef5d0e2e0ab07a590353a89b8726 /python/pyspark/sql/functions.py | |
parent | 4f9a66481849dc867cf6592d53e0e9782361d20a (diff) | |
download | spark-6624a588c1b3b6c05fb39285bc6215102dd109c6.tar.gz spark-6624a588c1b3b6c05fb39285bc6215102dd109c6.tar.bz2 spark-6624a588c1b3b6c05fb39285bc6215102dd109c6.zip |
Revert "[SPARK-12567] [SQL] Add aes_{encrypt,decrypt} UDFs"
This reverts commit 4f9a66481849dc867cf6592d53e0e9782361d20a.
Diffstat (limited to 'python/pyspark/sql/functions.py')
-rw-r--r-- | python/pyspark/sql/functions.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 7d038b8d9e..5fc1cc2cae 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -1125,43 +1125,6 @@ def hash(*cols): return Column(jc) -@ignore_unicode_prefix -@since(2.0) -def aes_encrypt(input, key): - """ - Encrypts input of given column using AES. Key lengths of 128, 192 or 256 bits can be used. 192 - and 256 bits keys can be used if Java Cryptography Extension (JCE) Unlimited Strength Jurisdic- - tion Policy Files are installed. If input is invalid, key length is not one of the permitted - values or using 192/256 bits key before installing JCE, an exception will be thrown. - - >>> df = sqlContext.createDataFrame([('ABC','1234567890123456')], ['input','key']) - >>> df.select(base64(aes_encrypt(df.input, df.key)).alias('aes')).collect() - [Row(aes=u'y6Ss+zCYObpCbgfWfyNWTw==')] - """ - sc = SparkContext._active_spark_context - jc = sc._jvm.functions.aes_encrypt(_to_java_column(input), _to_java_column(key)) - return Column(jc) - - -@ignore_unicode_prefix -@since(2.0) -def aes_decrypt(input, key): - """ - Decrypts input of given column using AES. Key lengths of 128, 192 or 256 bits can be used. 192 - and 256 bits keys can be used if Java Cryptography Extension (JCE) Unlimited Strength Jurisdic- - tion Policy Files are installed. If input is invalid, key length is not one of the permitted - values or using 192/256 bits key before installing JCE, an exception will be thrown. - - >>> df = sqlContext.createDataFrame([(u'y6Ss+zCYObpCbgfWfyNWTw==','1234567890123456')], \ - ['input','key']) - >>> df.select(aes_decrypt(unbase64(df.input), df.key).alias('aes')).collect() - [Row(aes=u'ABC')] - """ - sc = SparkContext._active_spark_context - jc = sc._jvm.functions.aes_decrypt(_to_java_column(input), _to_java_column(key)) - return Column(jc) - - # ---------------------- String/Binary functions ------------------------------ _string_functions = { |