Examples of encrypt()


Examples of org.globus.gsi.OpenSSLKey.encrypt()

        throws MyProxyException,GeneralSecurityException {

        X509Certificate[] certs = userCert.getCertificateChain();
        OpenSSLKey key =
            new BouncyCastleOpenSSLKey(userCert.getPrivateKey());
        key.encrypt(password);

        StoreParams param = new StoreParams();
        param.setUserName(username);
        param.setLifetime(maxDelegationLifetime);
        setAttributesTo(param, attributes);
View Full Code Here

Examples of org.globus.gsi.bc.BouncyCastleOpenSSLKey.encrypt()

        throws MyProxyException,GeneralSecurityException {

        X509Certificate[] certs = userCert.getCertificateChain();
        OpenSSLKey key =
            new BouncyCastleOpenSSLKey(userCert.getPrivateKey());
        key.encrypt(password);

        StoreParams param = new StoreParams();
        param.setUserName(username);
        param.setLifetime(maxDelegationLifetime);
        setAttributesTo(param, attributes);
View Full Code Here

Examples of org.gudy.azureus2.ui.console.util.StringEncrypter.encrypt()

   */
  public void setPassword(String password)
  {
    try {
      StringEncrypter encrypter = new StringEncrypter(StringEncrypter.DES_ENCRYPTION_SCHEME);
      setEncryptedPassword(encrypter.encrypt(password));
    } catch (EncryptionException e)
    {
      throw new AzureusCoreException("Unable to encrypt password", e);
    }
  }
View Full Code Here

Examples of org.h2.security.BlockCipher.encrypt()

        // http://csrc.nist.gov/groups/STM/cavp/documents/aes/KAT_AES.zip
        // ECBVarTxt128e.txt
        // COUNT = 0
        test.setKey(StringUtils.convertHexToBytes("00000000000000000000000000000000"));
        data = StringUtils.convertHexToBytes("80000000000000000000000000000000");
        test.encrypt(data, 0, data.length);
        r = StringUtils.convertBytesToHex(data);
        assertEquals("3ad78e726c1ec02b7ebfe92b23d9ec34", r);

        // COUNT = 127
        test.setKey(StringUtils.convertHexToBytes("00000000000000000000000000000000"));
View Full Code Here

Examples of org.hdiv.cipher.ICipherHTTP.encrypt()

      // Get Key from session
      Key key = this.session.getCipherKey();
      byte[] cipherData;
      synchronized (cipher) {
        cipher.initEncryptMode(key);
        cipherData = cipher.encrypt(baos.toByteArray());
      }

      // Encodes an array of bytes into an array of URL safe 7-bit characters.
      // Unsafe characters are escaped.
      byte[] encodedData = URLCodec.encodeUrl(null, cipherData);
View Full Code Here

Examples of org.infoglue.cms.util.DesEncryptionHelper.encrypt()

 
  private void handleCookies() throws Exception
  {
      DesEncryptionHelper encHelper = new DesEncryptionHelper();
    String userName = this.getRequest().getParameter("j_username");
      String encryptedName = encHelper.encrypt(userName);
    String password = this.getRequest().getParameter("j_password");
      String encryptedPassword = encHelper.encrypt(password);
     
      String encryptedNameAsBase64 = Base64.encodeBase64URLSafeString(encryptedName.getBytes("utf-8"));
      String encryptedPasswordAsBase64 = Base64.encodeBase64URLSafeString(encryptedPassword.getBytes("utf-8"));
View Full Code Here

Examples of org.internna.iwebmvc.core.crypto.impl.DES3CiphererDecipherer.encrypt()

    @Test
    public void setAsText() throws Exception {
        DES3CiphererDecipherer crypto = new DES3CiphererDecipherer();
        crypto.init();
        DocumentBinder binder = new DocumentBinder(crypto);
        binder.setAsText("mimeType=image/gif\nsizeInBytes=200\nuri=" + crypto.encrypt("/xx/yy.gif") + "\ncreated=2008-03-18\nidentifier=coverdata\n");
        Document doc = (Document) binder.getValue();
        assertEquals("coverdata", doc.getIdentifier());
        assertTrue(200 == doc.getSizeInBytes());
        Calendar c = Calendar.getInstance();
        assertTrue(doc.getCreated().compareTo(c.getTime()) < 0);
View Full Code Here

Examples of org.internna.iwebmvc.crypto.Cipherer.encrypt()

                JspContext context = getJspContext();
                Object val = new BeanWrapperImpl(entity).getPropertyValue(path);
                if (logger.isDebugEnabled()) logger.debug("Obtained value [" + path + "] for bean [" + entity + "]: " + val);
                if ((val != null) && encrypt) {
                    Cipherer cipher = (Cipherer) context.getAttribute(Cipherer.CIPHERER, 2);
                    val = cipher.encrypt(val.toString());
                }
                if (hasText(property)) context.setAttribute(property, val);
                else if (val != null) context.getOut().print(javascript ? encodeToJSEscapeSequences(val.toString()): encodeToHtmlEntities(val.toString()));
            } catch (Exception ex) {
                if (logger.isDebugEnabled()) logger.debug("Could not obtain a value for [" + path + "] in bean [" + entity.getClass().getName() + "]: " + ex.getMessage());
View Full Code Here

Examples of org.jasig.portal.security.IStringEncryptionService.encrypt()

        if (this.myOpaqueCredentials.credentialstring != null) {

            // Encrypt our credentials using the spring-configured password
            // encryption service
            IStringEncryptionService encryptionService = PasswordEncryptionServiceLocator.getPasswordEncryptionService();
            String encryptedPassword = encryptionService.encrypt(new String(this.myOpaqueCredentials.credentialstring));
            byte[] encryptedPasswordBytes = encryptedPassword.getBytes();

            // Save our encrypted credentials so the parent's authenticate()
            // method doesn't blow them away.
            this.cachedcredentials = new byte[encryptedPasswordBytes.length];
View Full Code Here

Examples of org.jasypt.encryption.pbe.StandardPBEByteEncryptor.encrypt()

        StandardPBEByteEncryptor encryptor = new StandardPBEByteEncryptor();

        char[] key = key();
        try {
            encryptor.setPasswordCharArray(key);
            return Base64.encodeBase64(encryptor.encrypt(toBytes(passwd)));
        }
        finally {
            scramble(key);
        }
    }
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.