henancngpcommu.java

来自「采用JAVA开发」· Java 代码 · 共 34 行

JAVA
34
字号
package com.gctech.cngpbj;

/**
 * <p>Title: 短信 API</p>
 * <p>Description: 短信SP API</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: GCTECH</p>
 * @author not attributable
 * @version $Id: HenanCngpCommu.java,v 1.1.1.1 2004/07/26 02:44:14 lijz Exp $
 */

public class HenanCngpCommu extends AbstractCngpCommu {
  public HenanCngpCommu() {
  }
  protected byte[] getPlain(String clientId, String auth, String time) {
    int plainLength = clientId.length() + 7 + auth.length() + 10;

    byte[] plain = new byte[plainLength];
    byte[] temp = clientId.getBytes();
    System.arraycopy(temp, 0, plain, 0, temp.length);
    int start = clientId.length() + 7;

    temp = auth.getBytes();
    System.arraycopy(temp, 0, plain, start, temp.length);
    start += auth.length();

    temp = time.getBytes();
    System.arraycopy(temp, 0, plain, start, temp.length);
    return plain;

  }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?