TNT blog |
|
|||
日歷
統(tǒng)計(jì)
導(dǎo)航常用鏈接留言簿(2)隨筆分類隨筆檔案文章分類
文章檔案
收藏夾home搜索最新隨筆最新評論
閱讀排行榜 |
/**
??? * Encode a string using Base64 encoding. Used when storing passwords ??? * as cookies. ??? * ??? * This is weak encoding in that anyone can use the decodeString ??? * routine to reverse the encoding. ??? * ??? * @param str ??? * @return String ??? */ ?? public static String encodeString(String str)? { ?????? sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder(); ?????? return encoder.encodeBuffer(str.getBytes()).trim(); ?? } ?? /**
|
![]() |
|
Copyright © TNT | Powered by: 博客園 模板提供:滬江博客 |