• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA/Encryption

 
Marcin Kwiatkowski
Ranch Hand
Posts: 32
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Is there any way to encrypt password field in entity beans?

I've got something like this:

@Entity
public class ApplicationUser{
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;

private String login;

private String password;

....

}

//user create
public void createApplicationUser(String login, String pass){
ApplicationUser user = new ApplicationUser();
user.setLogin(login);
user.setPassword(pass);
entityManager.persist(user);
}

I'm new to EJB technology, and not sure which tier should be responsible for encrypting data.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!