CipherInfo.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.utils.security;

  21. import java.security.Key;

  22. import javax.crypto.spec.IvParameterSpec;

  23. /**
  24.  * CipherInfo
  25.  *
  26.  * @author Poli Andrea (apoli@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */
  30. public class CipherInfo {

  31.     private byte[] salt;
  32.    
  33.     private byte[] iv;
  34.     private IvParameterSpec ivParameterSpec;
  35.    
  36.     private byte[] encodedKey;
  37.     private Key key;
  38.    
  39.     public byte[] getSalt() {
  40.         return this.salt;
  41.     }
  42.     public void setSalt(byte[] salt) {
  43.         this.salt = salt;
  44.     }
  45.     public byte[] getIv() {
  46.         return this.iv;
  47.     }
  48.     public void setIv(byte[] iv) {
  49.         this.iv = iv;
  50.     }
  51.     public IvParameterSpec getIvParameterSpec() {
  52.         return this.ivParameterSpec;
  53.     }
  54.     public void setIvParameterSpec(IvParameterSpec ivParameterSpec) {
  55.         this.ivParameterSpec = ivParameterSpec;
  56.     }
  57.     public byte[] getEncodedKey() {
  58.         return this.encodedKey;
  59.     }
  60.     public void setEncodedKey(byte[] encodedKey) {
  61.         this.encodedKey = encodedKey;
  62.     }
  63.     public Key getKey() {
  64.         return this.key;
  65.     }
  66.     public void setKey(Key key) {
  67.         this.key = key;
  68.     }
  69.    
  70. }