All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fun.fengwk.commons.codec.AES Maven / Gradle / Ivy

The newest version!
package fun.fengwk.commons.codec;

import javax.crypto.Cipher;

/**
 * 
 * @author fengwk
 */
public class AES extends AbstractCodec {

    private final byte[] secretKey;
    
    public AES(byte[] secretKey) {
        this.secretKey = secretKey;
    }

    @Override
    protected Cipher getEncryptor() {
        return CipherUtils.getAesEncryptor(secretKey);
    }

    @Override
    protected Cipher getDecryptor() {
        return CipherUtils.getAesDecryptor(secretKey);
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy