Class BaseCrypt

  • Direct Known Subclasses:
    Decrypts, Encrypts

    public abstract class BaseCrypt
    extends java.lang.Object
    加密解密基础类 内部使用
    Author:
    WD
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseCrypt()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static byte[] doFinal​(byte[] b, java.lang.String keys, int len, java.lang.String algorithm, int mode)
      计算密文
      protected static byte[] doFinal​(byte[] b, java.security.Key key, java.lang.String algorithm, int mode)
      计算密文
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseCrypt

        public BaseCrypt()
    • Method Detail

      • doFinal

        protected static final byte[] doFinal​(byte[] b,
                                              java.lang.String keys,
                                              int len,
                                              java.lang.String algorithm,
                                              int mode)
        计算密文
        Parameters:
        b - 要计算的字节数组
        keys - 计算密钥Key 长度有限制 DSE 为8位 ASE 为16位
        len - 长度一共几位
        algorithm - 算法
        mode - 计算模式 加密和解密
        Returns:
        字节数组
      • doFinal

        protected static final byte[] doFinal​(byte[] b,
                                              java.security.Key key,
                                              java.lang.String algorithm,
                                              int mode)
        计算密文
        Parameters:
        b - 要计算的字节数组
        key - 计算密钥Key 长度有限制 DSE 为8位 ASE 为16位
        algorithm - 算法
        mode - 计算模式 加密和解密
        Returns:
        字节数组