Examples of unwrap()


Examples of org.apache.jackrabbit.vault.util.console.ConsoleFile.unwrap()

        String jcrPath = (String) cl.getValue(argJcrPath);
        String name = (String) cl.getValue(argLocalPath);

        ConsoleFile wo = ctx.getFile(jcrPath, true);
        if (wo instanceof VaultFsCFile) {
            VaultFile file = (VaultFile) wo.unwrap();
            if (name == null) {
                name = file.getName();
            }
            File local = ctx.getVaultFsApp().getPlatformFile(name, false);
            doGet(file, local, forced);
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAQuery.unwrap()

        return em.createQuery(QueryLanguages.LANG_METHODQL, methodName);
    }
   
    public void testMethodQLWithParameters() {
        OpenJPAQuery q = createMethodQuery("echo");
        Query kernelQ = q.unwrap(Query.class);
        kernelQ.declareParameters("String firstName, String lastName");
        q.setParameter("firstName", "Fred").setParameter("lastName", "Lucas");
        Object result = q.getResultList().get(0);
        assertTrue(result instanceof Map);
        Map params = (Map)result;
View Full Code Here

Examples of org.apache.shindig.common.crypto.BasicBlobCrypter.unwrap()

  public void testFixedKey() throws Exception {
    BlobCrypter alt = new BasicBlobCrypter("0123456789abcdef".getBytes());
    Map<String, String> in = ImmutableMap.of("a","b");

    String blob = crypter.wrap(in);
    Map<String, String> out = alt.unwrap(blob, 30);
    assertEquals("b", out.get("a"));
  }

  @Test
  public void testBadKey() throws Exception {
View Full Code Here

Examples of org.apache.shindig.common.crypto.BlobCrypter.unwrap()

    String domain = domains.get(container);
    String activeUrl = tokenParameters.get(SecurityTokenCodec.ACTIVE_URL_NAME);
    String crypted = fields[1];
    try {
      BlobCrypterSecurityToken st = new BlobCrypterSecurityToken(container, domain, activeUrl,
          crypter.unwrap(crypted));
      return st.enforceNotExpired();
    } catch (BlobCrypterException e) {
      throw new SecurityTokenException(e);
    }
  }
View Full Code Here

Examples of org.apache.xml.security.algorithms.encryption.EncryptionMethod.unwrap()

      byte[] ciphertext2 = ed.getCipherData().getCipherValue().getCipherText();
      Key decrypt = em2.createSecretKeyFromBytes(
         org.apache.xml.security.utils.HexDump.hexStringToByteArray(
            "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f"));
      Key unwrapped =
         em2.unwrap(ciphertext2, wrapKey,
                    EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128);

      System.out.println();
      System.out.println();
      System.out.println();
View Full Code Here

Examples of org.apache.xml.security.algorithms.encryption.helper.AESWrapper.unwrap()

            JCEMapper
               .translateURItoJCEID(wrappedKeyURI, this
                  .getRequiredProviderName()).getAlgorithmID();
         int wrappedKeyType = JCEMapper.getKeyTypeFromURI(wrappedKeyURI);
         AESWrapper wrapper = new AESWrapper(this._cipher);
         byte[] encoded = wrapper.unwrap(wrappedKey, wrapKey);

         if (wrappedKeyType == Cipher.SECRET_KEY) {
            return new SecretKeySpec(encoded, wrappedKeyAlgorithm);
         } else {
            try {
View Full Code Here

Examples of org.apache.xml.security.encryption.EncryptedKey.unwrap()

            new EncryptedKey(this
               .getChildElementLocalName(0, EncryptionConstants
               .EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDKEY), this
                  ._baseURI);

         return ek.unwrap(wrapKey, EncryptionConstants.ALGO_ID_KEYWRAP_AES128);
      } catch (XMLSecurityException ex) {
         throw new RuntimeException(ex.getMessage());
      }
   }
View Full Code Here

Examples of org.bouncycastle.crypto.Wrapper.unwrap()

        wrapper.init(false, new KeyParameter(kek));

        try
        {
            byte[]  pText = wrapper.unwrap(out, 0, out.length);
            if (!Arrays.areEqual(pText, in))
            {
                return new SimpleTestResult(false, getName() + ": failed unwrap test " + id  + " expected " + new String(Hex.encode(in)) + " got " + new String(Hex.encode(pText)));
            }
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.AESWrapEngine.unwrap()

        wrapper.init(false, new KeyParameter(kek));

        try
        {
            byte[]  pText = wrapper.unwrap(out, 0, out.length);
            if (!Arrays.areEqual(pText, in))
            {
                return new SimpleTestResult(false, getName() + ": failed unwrap test " + id  + " expected " + new String(Hex.encode(in)) + " got " + new String(Hex.encode(pText)));
            }
        }
View Full Code Here

Examples of org.bouncycastle.crypto.engines.DESedeWrapEngine.unwrap()

        wrapper.init(false, new KeyParameter(kek));

        try
        {
            byte[]  pText = wrapper.unwrap(out, 0, out.length);
            if (!Arrays.areEqual(pText, in))
            {
                return new SimpleTestResult(false, getName() + ": failed unwrap test " + id  + " expected " + new String(Hex.encode(in)) + " got " + new String(Hex.encode(pText)));
            }
        }
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.