Package net.solosky.maplefetion.util

Examples of net.solosky.maplefetion.util.AuthGeneratorV4


     
      Pattern pt = Pattern.compile("Digest algorithm=\"SHA1-sess-v4\",nonce=\"(.*?)\",key=\"(.*?)\",signature=\"(.*?)\"");
      Matcher mc = pt.matcher(wwwHeader.getValue());
      if(mc.matches()) {
        String passHex = PasswordEncrypterV4.encryptV4(this.user.getUserId(),this.user.getPassword());
        AuthGeneratorV4 auth = new AuthGeneratorV4();
        String aeskey = ConvertHelper.byte2HexStringWithoutSpace(user.getAesKey());
          String response = auth.generate(mc.group(2), passHex, mc.group(1), aeskey);
          String authString ="Digest response=\""+response+"\",algorithm=\"SHA1-sess-v4\"";
          req.addHeader(SipcHeader.AUTHORIZATION, authString);
          req.addHeader("AK", "ak-value");
         
          String body = MessageTemplate.TMPL_USER_AUTH;
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.util.AuthGeneratorV4

Copyright © 2018 www.massapicom. 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.