Examples of encrypt()


Examples of au.net.causal.maven.nativesecurity.encrypter.NativeEncrypter.encrypt()

     
      //Prompt for password
      if (password == null || password.isEmpty())
        throw new MojoFailureException("No password entered");
     
      String encryptedBase64String = encrypter.encrypt(password);
     
      //Add our magic around the raw data
      String fullString = "{[type=native]" + encryptedBase64String + "}";
     
      //And display the result to the user
View Full Code Here

Examples of br.net.woodstock.rockframework.security.crypt.Crypter.encrypt()

  @Override
  protected String convertToString(final EncryptedType o) {
    Crypter crypter = this.crypter;
    byte[] bytes = o.getValue().getBytes();
    byte[] dec = crypter.encrypt(bytes);
    String text = new String(dec);
    return text;
  }

  protected EncryptedType wrap(final String text) {
View Full Code Here

Examples of cc.sketchchair.functions.MCrypt.encrypt()

   
   
    MCrypt mcrypt = new MCrypt();
    /* Encrypt */
    try {
       encrypted = MCrypt.bytesToHex( mcrypt.encrypt(loginPassword.getText()) );
    } catch (Exception e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
    /* Decrypt */
 
View Full Code Here

Examples of ch.inftec.ju.security.JuTextEncryptor.encrypt()

  public void canEncryptText_usingBasicEncryptor() {
    JuTextEncryptor encryptor = JuSecurityUtils.buildEncryptor()
        .password("secret")
        .createTextEncryptor();
   
    String encryptedString = encryptor.encrypt("String"); // The encrypted String will not be constant...
    Assert.assertNotNull(encryptor.encrypt("String"));
    Assert.assertEquals("String", encryptor.decrypt(encryptedString));
  }
 
  @Test
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.io.crypto.AESUtils.encrypt()

    @Test
    public void test_simple() {
        AESUtils aes = new AESUtils();
        aes.generateSecretKey();
        byte[] data = getBlock(10 * 1024);
        byte[] encrypt = aes.encrypt(data);
        byte[] decrypt = aes.decrypt(encrypt);
        System.out.println("data length : " + data.length + " " + encrypt.length);
        check(data, decrypt);
    }

View Full Code Here

Examples of com.avaje.ebeaninternal.server.type.SimpleAesEncryptor.encrypt()

    EncryptKey key = new BasicEncryptKey("hello");

    byte[] data = "test123".getBytes();

    byte[] ecData = e.encrypt(data, key);
    System.out.println(Arrays.toString(ecData));

    byte[] deData = e.decrypt(ecData, key);

    String s = new String(deData);
View Full Code Here

Examples of com.bj58.spat.gaea.server.secure.DESHelper.encrypt()

  @Test
  public void testEncrypt() throws Exception {
    DESHelper desHelper = DESHelper.getInstance("abcdefgh");
    String src = "q3rgtasdfgqet83tseflgasdf^@$FSGaweg";
   
    byte[] destBuf = desHelper.encrypt(src.getBytes("utf-8"));
    byte[] srcBuf = desHelper.decrypt(destBuf);
    Assert.assertEquals(src, new String(srcBuf, "utf-8"));
  }
 
View Full Code Here

Examples of com.centraview.common.Password.encrypt()

      }
      HashMap hm = (HashMap) vec.elementAt(0);
      String strPassword = (String) hm.get("Password");

      Password passwordService = Password.getInstance();
      String encryptedPassword = passwordService.encrypt(password);

      if ((strPassword != null) && strPassword.equals(encryptedPassword)) {
        dl.setSql("common.user.details");

        Long lngObj = (Long) hm.get("IndividualID");
View Full Code Here

Examples of com.drighetto.essai.bouncycastle.cipher.AsymmetricKeyCipher.encrypt()

      System.out.println("[Cipher Sample]");
      asymmetricKeyCipher = new AsymmetricKeyCipher();
      System.out.println("**Sample 1 : Encryption**");
      System.out.println("Original message : [" + new String(msg) + "]");
      System.out.println("Size             : [" + new String(msg).length() + "]");
      tempEncrypt = asymmetricKeyCipher.encrypt(msg);
      System.out.println("**Sample 2 : Decryption**");
      tempDecrypt = asymmetricKeyCipher.decrypt(tempEncrypt);
      tmpStr = new String(tempDecrypt);
      System.out.println("message : [" + tmpStr + "]");
      System.out.println("Size    : [" + tmpStr.length() + "]");
View Full Code Here

Examples of com.drighetto.essai.bouncycastle.cipher.AsymmetricKeyLongTextCipher.encrypt()

      String longText = RandomStringUtils.randomAlphanumeric(5000);
      System.out.println("**Sample 1 : Encryption**");
      System.out.println("Key size         : [" + asymmetricKeyCipher.getKeySize() + "]");
      System.out.println("Original message : [" + longText + "]");
      System.out.println("Size             : [" + longText.length() + "]");
      byte[] tempEncrypt = asymmetricKeyCipher.encrypt(longText.getBytes());
      System.out.println("**Sample 2 : Decryption**");
      byte[] tempDecrypt = asymmetricKeyCipher.decrypt(tempEncrypt);
      String tmpStr = new String(tempDecrypt);
      System.out.println("message          : [" + tmpStr + "]");
      System.out.println("Size             : [" + tmpStr.length() + "]");
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.