Package de.esoco.microsafe.crypto

Examples of de.esoco.microsafe.crypto.CryptoHandler


   * @throws UserNotificationException If an error occurs
   */
  void changeNodeEncryption(final MicroSafeNode rNode)
    throws UserNotificationException
  {
    CryptoHandler rCrypto  = rNode.getCryptoHandler();
    final boolean bEncrypt = !rNode.isEncrypted();

    if (rCrypto == null)
    {
      boolean bNewEncryption = !rModel.usesEncryption();
View Full Code Here


   *
   * @throws UserNotificationException If an error occurs
   */
  void changePassword() throws UserNotificationException
  {
    CryptoHandler rCrypto = rModel.getCryptoHandler();

    if (rModel.usesEncryption() && rCrypto == null)
    {
      Executable aNewPwQuery = new Executable()
      {
View Full Code Here

   * @throws CryptoException  If enabling or disabling the encryption fails
   */
  public void setEncryption(boolean bEncrypt) throws CryptoException,
                             StorageException
  {
    CryptoHandler aCrypto = getCryptoHandler();

    if (aCrypto != null)
    {
      if (bEncrypt)
      {
View Full Code Here

   * @throws CryptoException  If changing the encryption fails
   */
  protected void changeEncryption(CryptoHandler rNewCrypto)
    throws CryptoException, StorageException
  {
    CryptoHandler rCurrentCrypto = getCryptoHandler();

    if (((rNewCrypto == null) && (rCurrentCrypto != null)) ||
      ((rNewCrypto != null) && !rNewCrypto.equals(rCurrentCrypto)))
    {
      // re-encryption is only necessary if nodes are already encrypted
View Full Code Here

   */
  public void setEncryptionKey(byte[] rKey) throws InvalidKeyException,
                           CryptoException,
                           StorageException
  {
    CryptoHandler aNewCrypto = null;

    if (rKey != null)
    {
      aNewCrypto = new CryptoHandler(rKey);
      aNewCrypto.setProgressMonitor(rProgressMonitor);
    }

    if (((aNewCrypto == null) && (aCryptoHandler != null)) ||
      ((aNewCrypto != null) && !aNewCrypto.equals(aCryptoHandler)))
    {
      if ((aCryptoHandler == null) && (aKeyVerificationData != null))
      {
        verifyKey(aNewCrypto);

        return;
      }

      changeEncryption(aNewCrypto);

      // generate key verification data for the new key or reset it
      if (aNewCrypto != null)
      {
        aKeyVerificationData = aNewCrypto.generateKeyVerification(KEY_VERIFY_ITERATIONS);
      }
      else
      {
        aKeyVerificationData = null;
      }
View Full Code Here

TOP

Related Classes of de.esoco.microsafe.crypto.CryptoHandler

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.