Examples of CipherException


Examples of com.im.imjutil.exception.CipherException

      messageDigest.reset();
      messageDigest.update(value);
      return messageDigest.digest();
     
    } catch (Exception e) {
      throw new CipherException(Convert.toString(
          "Erro ao codificar, causa [", e.getClass().getSimpleName(),
          " - ", e.getMessage(), "]"), e);
    }
  }
View Full Code Here

Examples of com.im.imjutil.exception.CipherException

    }
  }

  @Override
  public byte[] decrypt(byte[] value) throws CipherException {
    throw new CipherException(Convert.toString(
        "Operacao nao suportada pelo algoritmo [", type.cipher, "]"));
  }
View Full Code Here

Examples of com.im.imjutil.exception.CipherException

class Base64Cipher extends Cipher {

  @Override
  public byte[] encrypt(byte[] value) throws CipherException {
    if (value == null || value.length == 0) {
      throw new CipherException("Byte array nulo ou invalido");
    }
    return Base64.encode(value).getBytes();
  }
View Full Code Here

Examples of com.im.imjutil.exception.CipherException

  }

  @Override
  public byte[] decrypt(byte[] value) throws CipherException {
    if (value == null || value.length == 0) {
      throw new CipherException("Byte array nulo ou invalido");
    }
    return Base64.decode(new String(value));
  }
View Full Code Here

Examples of com.im.imjutil.exception.CipherException

      initialize();
      cipherAlgorithm.init(javax.crypto.Cipher.ENCRYPT_MODE, secretKey);
      return cipherAlgorithm.doFinal(value);
     
    } catch (Exception e) {
      throw new CipherException(Convert.toString(
          "Cipher error: ", e.getMessage()), e);
    }
  }
View Full Code Here

Examples of com.im.imjutil.exception.CipherException

      initialize();
      cipherAlgorithm.init(javax.crypto.Cipher.DECRYPT_MODE, secretKey);
      return cipherAlgorithm.doFinal(value);
     
    } catch (Exception e) {
      throw new CipherException(Convert.toString(
          "Cipher error: ", e.getMessage()), e);
    }
  }
View Full Code Here

Examples of org.syncany.crypto.CipherException

            }
          }
        }

        if (configTO.getTransferSettings() == null) {
          throw new CipherException("Unable to decrypt link.");
        }
      }
      else {
        logger.log(Level.INFO, " - Link is NOT encrypted. No password needed.");
View Full Code Here

Examples of org.syncany.crypto.CipherException

      return repoFileStr;
    }
    catch (Exception e) {
      logger.log(Level.INFO, "Invalid password given, or repo file corrupt.", e);
      throw new CipherException("Invalid password given, or repo file corrupt.", e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.