[5.x] What replaces PublicEncryptionFactory?

14 views
Skip to first unread message

Nathan Keiter

unread,
Feb 22, 2019, 1:37:24 AM2/22/19
to dotCMS User Group
I see PublicEncryptionFactory is deprecated. What should replace it?

As in:

user.setPassword( PublicEncryptionFactory.digestString( password ) );

Falzone, Chris

unread,
Feb 22, 2019, 10:18:59 AM2/22/19
to dot...@googlegroups.com
I'd also like to know.  We have that in our code depreciated and I never ended up figuring out the replacement.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/973174f1-23ce-4fa0-b046-e766c746997d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Christopher Falzone

Interactive Developer


A Q U E N T

Digital, Creative, and Marketing Talent


aquent.com

cfal...@aquent.com

jonathan...@dotcms.com

unread,
Mar 3, 2019, 2:49:09 PM3/3/19
to dotCMS User Group
You can use the:

com.dotcms.util.security.Encryptor encryptor = EncryptorFactory.getInstance();

user.setPassword(encryptor.digest(password));

Falzone, Chris

unread,
Mar 4, 2019, 9:06:03 AM3/4/19
to dot...@googlegroups.com
Thanks Jonathan, I made to replace the code when I get a chance.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nathan Keiter

unread,
Apr 2, 2019, 11:55:20 AM4/2/19
to dotCMS User Group
Just to follow up on this, here is the complete 5.x solution:

import com.dotcms.util.security.Encryptor;
import com.dotcms.util.security.EncryptorFactory;

Encryptor encryptor = EncryptorFactory.getInstance().getEncryptor();

String result = encryptor.digest( password );

On Monday, March 4, 2019 at 9:06:03 AM UTC-5, Chris Falzone wrote:
Thanks Jonathan, I made to replace the code when I get a chance.

On Sun, Mar 3, 2019 at 2:49 PM <jonatha...@dotcms.com> wrote:
You can use the:

com.dotcms.util.security.Encryptor encryptor = EncryptorFactory.getInstance();

user.setPassword(encryptor.digest(password));

On Friday, February 22, 2019 at 12:37:24 AM UTC-6, Nathan Keiter wrote:
I see PublicEncryptionFactory is deprecated. What should replace it?

As in:

user.setPassword( PublicEncryptionFactory.digestString( password ) );

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dot...@googlegroups.com.

To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/bd05ab74-1696-46a9-a4e5-44ea334e3c19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages