Examples of toSecurityKey()


Examples of com.github.ebnew.ki4so.core.key.Ki4soKey.toSecurityKey()

          byte[] data =  Base64Coder.decryptBASE64(items[0]);
          //查询键值。
          Ki4soKey ki4soKey = keyService.findKeyByKeyId(encryCredentialInfo.getKeyId());
          if(ki4soKey!=null){
            //使用密钥进行解密。
            byte[] origin = DESCoder.decrypt(data, ki4soKey.toSecurityKey());
            //将byte数组转换为字符串。
            String json = new String(origin);
            @SuppressWarnings("rawtypes")
            Map map = (Map)JSON.parse(json);
            if(map!=null){
View Full Code Here

Examples of com.github.ebnew.ki4so.core.key.Ki4soKey.toSecurityKey()

    }
    //查询键值。
    Ki4soKey ki4soKey = keyService.findKeyByKeyId(encryCredentialInfo.getKeyId());
    if(ki4soKey!=null){
      //查询键值。
      Key key = ki4soKey.toSecurityKey();
      if(key!=null){
        byte[] data = DESCoder.encrypt(JSON.toJSONBytes(map), key);
        //先用BASE64编码,再用URL编码。
        return Base64Coder.encryptBASE64(data);
      }
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.