提交 5e71d1ef 编写于 作者: K kohsuke

this is more convenient.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10734 71c3de6d-444a-0410-be80-ed276b4c234a
上级 9e6bf638
......@@ -18,6 +18,7 @@ import java.io.UnsupportedEncodingException;
*/
public class Scrambler {
public static String scramble(String secret) {
if(secret==null) return null;
try {
return new String(Base64.encode(secret.getBytes("UTF-8")));
} catch (UnsupportedEncodingException e) {
......@@ -26,6 +27,7 @@ public class Scrambler {
}
public static String descramble(String scrambled) {
if(scrambled==null) return null;
try {
return new String(Base64.decode(scrambled.toCharArray()),"UTF-8");
} catch (IOException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册