• 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic