| | |
| | | |
| | | import android.util.Base64; |
| | | |
| | | import com.basic.security.manager.BaseManager; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | |
| | | for (String table : tableIgnoreKeys.keySet()) { |
| | | tableList.add(table); |
| | | } |
| | | BaseManager.syncTableNames = tableList; |
| | | // BaseManager.syncTableNames = tableList; |
| | | } |
| | | |
| | | public static String encodeToString(String table, String key, String strValue) { |
| | |
| | | strValue = "base64_" + strValue; |
| | | } |
| | | } catch (UnsupportedEncodingException e) { |
| | | System.out.println(e.getMessage()); |
| | | System1.out.println(e.getMessage()); |
| | | } |
| | | return strValue; |
| | | } |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | System.out.println("Base64Util.decodeToString execption=" + e.getMessage()); |
| | | System1.out.println("Base64Util.decodeToString execption=" + e.getMessage()); |
| | | } |
| | | return strValue; |
| | | } |
| | |
| | | try { |
| | | if (bytes != null) { |
| | | if (bytes.length == 2560) { |
| | | // System.out.println("encode feature="+feature); |
| | | // System1.out.println("encode feature="+feature); |
| | | return Base64.encodeToString(bytes, Base64.NO_WRAP); |
| | | } else { |
| | | // System.out.println("feature长度不对(encode) " + FrameUtil.getFrames()); |
| | | // System1.out.println("feature长度不对(encode) " + FrameUtil.getFrames()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | if (bytes.length == 2560) { |
| | | return bytes; |
| | | } else { |
| | | System.out.println("feature长度不对(decode)"); |
| | | System1.out.println("feature长度不对(decode)"); |
| | | } |
| | | } |
| | | } |