Click here to Skip to main content
15,896,111 members
Articles / Programming Languages / Java

Encrypt Personal Data in Database using Bouncy Castle and Java Simplified Encryption

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
13 Feb 2012CPOL5 min read 43.4K   415   12  
Bouncy Castle provide encrypt/decrypt your personal data such as password, SSN, credit card numbers etc. using Simple JASYPT framework.
package com.jasypt.domain.person;

import java.io.Serializable;
import java.util.Date;

public class Person implements Serializable
{
    private Integer id;
    private String name;
    private Date date;
    private String ssn;
    
    public Person()
    {
        
    }
    public Integer getId()
    {
        return id;
    }
    public void setId(Integer id)
    {
        this.id = id;
    }
    public String getName()
    {
        return name;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public Date getDate()
    {
        return date;
    }
    public void setDate(Date date)
    {
        this.date = date;
    }
    public String getSsn()
    {
        return ssn;
    }
    public void setSsn(String ssn)
    {
        this.ssn = ssn;
    }
    
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Consultant
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions