Package br.net.woodstock.rockframework.security.crypt

Examples of br.net.woodstock.rockframework.security.crypt.CrypterException


    try {
      Assert.notNull(data, "data");
      CrypterOperation operation = new CrypterOperation(publicKey, Mode.DECRYPT, data);
      return operation.execute();
    } catch (Exception e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here


        generator.init(random);
      }

      this.key = generator.generateKey();
    } catch (GeneralSecurityException e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

    try {
      Assert.notNull(data, "data");
      CrypterOperation operation = new CrypterOperation(this.key, Mode.ENCRYPT, data);
      return operation.execute();
    } catch (Exception e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

    try {
      Assert.notNull(data, "data");
      CrypterOperation operation = new CrypterOperation(this.key, Mode.DECRYPT, data);
      return operation.execute();
    } catch (Exception e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

      PublicKey publicKey = factory.generatePublic(specPublic);

      KeyPair keyPair = new KeyPair(publicKey, privateKey);
      return keyPair;
    } catch (Exception e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

      }
      KeyPair keyPair = new KeyPair(publicKey, privateKey);
      AsyncCrypter crypter = new AsyncCrypter(keyPair);
      return crypter;
    } catch (Exception e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

      SecretKeySpec keySpec = new SecretKeySpec(bytes, this.type.getAlgorithm());
      SyncCrypter crypter = new SyncCrypter(keySpec);

      return crypter;
    } catch (IOException e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

        this.publicKeyOutputStream.write(base64);
      } else {
        CoreLog.getInstance().getLog().info("Public or publicKeyOutputStream is null and cold not be writed");
      }
    } catch (IOException e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

      }

      this.keyPairType = type;
      this.keyPair = generator.generateKeyPair();
    } catch (GeneralSecurityException e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

    try {
      Assert.notNull(data, "data");
      CrypterOperation operation = new CrypterOperation(privateKey, Mode.ENCRYPT, data, seed);
      return operation.execute();
    } catch (Exception e) {
      throw new CrypterException(e);
    }
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.security.crypt.CrypterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.