Class AES

  • All Implemented Interfaces:
    ICrypto

    public class AES
    extends java.lang.Object
    implements ICrypto
    • Constructor Summary

      Constructors 
      Constructor Description
      AES​(byte[] src)  
      AES​(ICrypto c)  
      AES​(java.lang.String key, byte[] iv, ICrypto c)  
      AES​(java.lang.String key, ICrypto c)  
    • Constructor Detail

      • AES

        public AES​(byte[] src)
      • AES

        public AES​(java.lang.String key,
                   ICrypto c)
      • AES

        public AES​(java.lang.String key,
                   byte[] iv,
                   ICrypto c)
    • Method Detail

      • encryptBytes

        public byte[] encryptBytes​(byte[] src)
                            throws java.lang.Exception
        加密.
        Throws:
        java.lang.Exception
      • decryptBytes

        public byte[] decryptBytes​(byte[] srcBytes)
                            throws java.lang.Exception
        解密.
        Throws:
        java.lang.Exception
      • encode

        public byte[] encode()
        Description copied from interface: ICrypto
        encode
        Specified by:
        encode in interface ICrypto
        Returns:
      • decode

        public byte[] decode()
        Description copied from interface: ICrypto
        decode
        Specified by:
        decode in interface ICrypto
        Returns:
      • getData

        public byte[] getData()
        Description copied from interface: ICrypto
        get data
        Specified by:
        getData in interface ICrypto
        Returns:
      • setData

        public ICrypto setData​(byte[] src)
        Description copied from interface: ICrypto
        set data
        Specified by:
        setData in interface ICrypto