Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
9 replies
Subscribers
7 subscribers
Views
4453 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Any suggestions on how to encrypt text, persist it to database and retrieve it l
Jess
over 8 years ago
Any suggestions on how to encrypt text, persist it to database and retrieve it later?
I'm currently looking on some conversion expression like dec2hex/hex2dec, oct2hex/hex2oct but to no success since decryption is not possible and giving me infinite symbol, i think it can't convert back the value because it's too big.
Right now, I'm using a!encryptedtextField and I can save the encryptedtext value to db but having issues retrieving it from the database. The query rule is giving this error: "String has invalid data (Could not cast from Encrypted Text to Text. Details: CastInvalid)" any suggestions how to deal with this?
OriginalPostID-171359
OriginalPostID-171359
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 8 years ago
Maybe this could help
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
The shared component is called "Java Cryptography Architecture (JCA) Tools"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jess
over 8 years ago
Hi Eduardo, thanks for the quick response. I already saw it and asked forum to install it on our instance. But I'm just wondering if it would require something to be installed for the key and cryptographic service provider? So you mean, I can use the keyencrypt/keydecrypt without issues like what I am experiencing when retrieving the encrypted text from db? Will try it also as soon as the plugin has been installed.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
No you should not need anything else since it uses the JDK. Give it try.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jess
over 8 years ago
great!thanks Eduardo.. hope it'll work
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jess
over 8 years ago
hi eduardo, was able to encrypt, but im having issues in decrypting :
Expression evaluation error at function 'keydecrypt': Error evaluating function 'keydecrypt' : An error occurred: java.security.InvalidKeyException: requires PBE parameters. note that I'm using the same key and cipher transformation used in keyencrypt as indicated in the expression expression.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
Does passwordencrypt and passworddecrypt work fine? I've not used this functions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jess
over 8 years ago
it's working using the passwordencrypt/decrypt function..thanks so much eduardo! since return value for these function are all in text..i assumed there'll be no issues saving and retrieving it in db..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
Great news. Maybe the usage of keyencrypt and keydecrypt is different from what you're doing but if passwordencrypt and passworddecrypt are working fine and they meet your requirements you could use them instead.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel