Package org.odftoolkit.odfdom.pkg.manifest

Examples of org.odftoolkit.odfdom.pkg.manifest.EncryptionData


  }

  private boolean isEncrypted(String aEntryName, Logger aLogger) {
    OdfFileEntry aFileEntry = getPackage(aLogger).getFileEntry(aEntryName);
    if (aFileEntry != null) {
      EncryptionData aEncData = aFileEntry.getEncryptionData();
      if (aEncData != null) {
        aLogger.logFatalError("stream content is encrypted. Validataion of encrypted content is not supported.");
        return true;
      }
    }
View Full Code Here


          throw new SAXException("not a number: "
              + atts.getValue("manifest:size") + nfe.getMessage());
        }
      }
    } else if (localName.equals("encryption-data")) {
      _currentEncryptionData = new EncryptionData();
      if (_currentFileEntry != null) {
        _currentEncryptionData.setChecksumType(atts.getValue("manifest:checksum-type"));
        _currentEncryptionData.setChecksum(atts.getValue("manifest:checksum"));
        _currentFileEntry.setEncryptionData(_currentEncryptionData);
      }
View Full Code Here

            if (i > 0) {
              buf.append(" manifest:size=\"");
              buf.append(i);
              buf.append("\"");
            }
            EncryptionData enc = fileEntry.getEncryptionData();
            if (enc != null) {
              buf.append(">\n");
              buf.append("  <manifest:encryption-data>\n");
              Algorithm alg = enc.getAlgorithm();
              if (alg != null) {
                buf.append("   <manifest:algorithm");
                s = alg.getName();
                if (s != null) {
                  buf.append(" manifest:algorithm-name=\"");
                  buf.append(encodeXMLAttributes(s));
                  buf.append("\"");
                }
                s = alg.getInitializationVector();
                if (s != null) {
                  buf.append(" manifest:initialization-vector=\"");
                  buf.append(encodeXMLAttributes(s));
                  buf.append("\"");
                }
                buf.append("/>\n");
              }
              KeyDerivation keyDerivation = enc.getKeyDerivation();
              if (keyDerivation != null) {
                buf.append("   <manifest:key-derivation");
                s = keyDerivation.getName();
                if (s != null) {
                  buf.append(" manifest:key-derivation-name=\"");
View Full Code Here

          throw new SAXException("not a number: "
              + atts.getValue("manifest:size") + nfe.getMessage());
        }
      }
    } else if (localName.equals("encryption-data")) {
      _currentEncryptionData = new EncryptionData();
      if (_currentFileEntry != null) {
        _currentEncryptionData.setChecksumType(atts.getValue("manifest:checksum-type"));
        _currentEncryptionData.setChecksum(atts.getValue("manifest:checksum"));
        _currentFileEntry.setEncryptionData(_currentEncryptionData);
      }
View Full Code Here

            if (i > 0) {
              buf.append(" manifest:size=\"");
              buf.append(i);
              buf.append("\"");
            }
            EncryptionData enc = fileEntry.getEncryptionData();
            if (enc != null) {
              buf.append(">\n");
              buf.append("  <manifest:encryption-data>\n");
              Algorithm alg = enc.getAlgorithm();
              if (alg != null) {
                buf.append("   <manifest:algorithm");
                s = alg.getName();
                if (s != null) {
                  buf.append(" manifest:algorithm-name=\"");
                  buf.append(encodeXMLAttributes(s));
                  buf.append("\"");
                }
                s = alg.getInitializationVector();
                if (s != null) {
                  buf.append(" manifest:initialization-vector=\"");
                  buf.append(encodeXMLAttributes(s));
                  buf.append("\"");
                }
                buf.append("/>\n");
              }
              KeyDerivation keyDerivation = enc.getKeyDerivation();
              if (keyDerivation != null) {
                buf.append("   <manifest:key-derivation");
                s = keyDerivation.getName();
                if (s != null) {
                  buf.append(" manifest:key-derivation-name=\"");
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.pkg.manifest.EncryptionData

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.