Examples of BASE64Decoder


Examples of sun.misc.BASE64Decoder

                        String username = usernamePropertySet.get(usernamePropertySet.size()-1);

                        List<String> passwordPropertySet = resource.getPropertyValues(IssueTrackerConstants.ACCOUNT_PASSWORD);
                        String encryptedPassword = passwordPropertySet.get(passwordPropertySet.size()-1);

                        byte[] base64DecodedBytes = (new BASE64Decoder()).decodeBuffer(encryptedPassword);

                        String password = new String(CryptoUtil.getDefaultCryptoUtil().decrypt(base64DecodedBytes));


                        String isAutoReportingEnabled = resource.getProperty(IssueTrackerConstants.AUTO_REPORTING);
View Full Code Here

Examples of sun.misc.BASE64Decoder

  }

    public byte[] readDecodedBytes(String name) throws IOException {
    char[] ba = readWrappedBody(name);
    int n = ba.length;
    return new BASE64Decoder().decodeBuffer(new String(ba, 0, n));
  }
View Full Code Here

Examples of sun.misc.BASE64Decoder

            case BASE64:
                if (log.isDebugEnabled()) {
                    log.debug("base64 decoding on input  ");
                }
                decodedInputStream = new ByteArrayInputStream(
                         new BASE64Decoder().decodeBuffer(inputStream));
                break;
            case BIGINTEGER16:
                if (log.isDebugEnabled()) {
                    log.debug("BigInteger 16 encoding on output ");
                }
View Full Code Here

Examples of sun.misc.BASE64Decoder

        if (privateKey == null) {
            handleException("Error private key can not be null ");
        }

        try {
            decrypted= cipher.doFinal(new BASE64Decoder().decodeBuffer(encryptedPassword));
        } catch (Exception e) {
            handleException("Error occurred when decrypting encrypted value");
        }
        return new String(decrypted);
    }
View Full Code Here

Examples of sun.misc.BASE64Decoder

     * @param str
     * @return @throws
     *         IOException
     */
    public String decrypt(String str) throws IOException {
        byte[] inputBytes = new BASE64Decoder().decodeBuffer(str);// The input
        // text bytes.
        byte[] clearBytes = new byte[inputBytes.length]; // The decrypted bytes.
        for (int i = 0; i < inputBytes.length; i += 8) {
            cipher.decrypt(inputBytes, i, clearBytes, i);
        }
View Full Code Here

Examples of sun.misc.BASE64Decoder

            return "";
        }       
    }

    public static String decodeString(String encryptedPwd) {
        BASE64Decoder decoder = new BASE64Decoder() ;
       
        try {       
            byte[] passwordBytes =
                decoder.decodeBuffer(encryptedPwd);
            Cipher cipher = Cipher.getInstance("DES");
            cipher.init(Cipher.DECRYPT_MODE, key);
            passwordBytes = cipher.doFinal(passwordBytes);
            return new String (passwordBytes, "UTF8");
        }
View Full Code Here

Examples of sun.misc.BASE64Decoder

            return false;
        }
        // Get encoded user and password, comes after "BASIC "
        String userpassEncoded = authHeader.substring( 6 );

        BASE64Decoder dec = new BASE64Decoder();
        String userpassDecoded = new String( dec.decodeBuffer( userpassEncoded ) );
        int idx = userpassDecoded.indexOf( ':' );

        if ( idx == -1 )
        {
            return false;
View Full Code Here

Examples of sun.misc.BASE64Decoder

            return false;
        }
        // Get encoded user and password, comes after "BASIC "
        String userpassEncoded = authHeader.substring( 6 );

        BASE64Decoder dec = new BASE64Decoder();
        String userpassDecoded = new String( dec.decodeBuffer( userpassEncoded ) );
        int idx = userpassDecoded.indexOf( ':' );

        if ( idx == -1 )
        {
            return false;
View Full Code Here

Examples of sun.misc.BASE64Decoder

  public static String decrypt(String str) {
    try {
      final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION);
      cipher.init(Cipher.DECRYPT_MODE, getKey());
      // Decode base64 to get bytes
      final byte[] dec = new BASE64Decoder().decodeBuffer(str);

      // Decrypt
      final byte[] utf8 = cipher.doFinal(dec);

      // Decode using utf-8
View Full Code Here

Examples of sun.misc.BASE64Decoder

        SecretKey theKey = get3DesKey(strKey);

        String output = "";
        try {
            Cipher cipher = Cipher.getInstance("Desede/ECB/PKCS5Padding");
            BASE64Decoder dec = new BASE64Decoder();
            byte[] ciphertext = dec.decodeBuffer(strPwdCode);
            // 解密过程。
            cipher.init(Cipher.DECRYPT_MODE, theKey);
            byte[] decryptedText = cipher.doFinal(ciphertext);
            output = new String(decryptedText, "UTF8");
        } catch (Exception e) {
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.