Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Custom Function for Encryption

Avatar

Avatar
Validate 1
Level 3
asariaaara
Level 3

Likes

18 likes

Total Posts

48 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
asariaaara
Level 3

Likes

18 likes

Total Posts

48 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
asariaaara
Level 3

22-03-2019

Hey Geeks,

I made a custom function which encrypts the data using encrypt Postgresql Function.

The code goes like:

<funcList name="myList" namespace="cus">

      <group name="string" label="String">

        <function name="EncryptString" type="string" args="(&lt;String&gt;)" help="Encrypts given String with AES using hugyourclient"

                  minArgs="1" maxArgs="1" display="Encrypts given String with AES using hugyourclient">

          <providerPart provider="PostgreSQL" body="ENCRYPT(($1),'hugyourclient','aes')"/>

        </function>

      </group>

    </funcList>

However this gives me following error:

1716845_pastedImage_1.png

Am I doing any mistake.

or is there any other way of implementation.

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
parveshp7822672
Level 3

25-03-2019

Hello,

BY default encryption is not installed on postgres.

1. First run the follwoing command to see the list of avialble encrytion:

postgres=> show rds.extensions;

2. Add the pgcrypto on your postgres data base:

postgres=> create extension pgcrypto;
3. Again print list:

postgres=> show rds.extensions;

1718374_pastedImage_2.png

You should get pgcrypto and try again.

You should have access of your database to run following query. If not you can share this with your datbase team.

You can alos check this url: postgresql 9.3 - Can't run digest() on PosrgreSQL 9.3 on RDS - Database Administrators Stack Exchang...

Thanks.

Parvesh.

Avatar

Avatar
Validate 1
Level 3
asariaaara
Level 3

Likes

18 likes

Total Posts

48 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
asariaaara
Level 3

Likes

18 likes

Total Posts

48 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
asariaaara
Level 3

26-03-2019

Hi Parvesh,

Thanks for your help.

However this extension pgcrypto is already installed.

Regards