小编Mas*_*ini的帖子

用于LDAP的ssha中的密码加密的Java方法

我想在ssha中加密密码。存在一种方法吗?我找到了,但是在sha。

private String encrypt(final String plaintext) {
        MessageDigest md = null;
        try {
            md = MessageDigest.getInstance("SHA");
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e.getMessage());
        }
        try {
            md.update(plaintext.getBytes("UTF-8"));
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e.getMessage());
        }
        byte raw[] = md.digest();
        String hash = (new BASE64Encoder()).encode(raw);
        return hash;
    }
Run Code Online (Sandbox Code Playgroud)

java encryption ssha

2
推荐指数
1
解决办法
5653
查看次数

我可以在点击事件HTML中使用引导箱(引导弹出窗口)吗?

我必须问您是否真的要删除选定的项目,我想使用引导箱。...这不起作用!

<s:a onclick="return bootbox.confirm('Are you sure?')" action="deleteElement">
Run Code Online (Sandbox Code Playgroud)

html jquery twitter-bootstrap

0
推荐指数
1
解决办法
243
查看次数

标签 统计

encryption ×1

html ×1

java ×1

jquery ×1

ssha ×1

twitter-bootstrap ×1