Class SHA3


  • public class SHA3
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SHA3​(int r, int c, int n)
      Initialise Keccak sponge
    • Constructor Detail

      • SHA3

        public SHA3​(int r,
                    int c,
                    int n)
        Initialise Keccak sponge
        Parameters:
        r - The bitrate
        c - The capacity
    • Method Detail

      • reset

        public void reset()
      • update

        public void update​(byte[] msg)
        Absorb the more of the message message to the Keccak sponge
        Parameters:
        msg - The partial message
      • update

        public void update​(byte[] msg,
                           int msglen)
        Absorb the more of the message message to the Keccak sponge
        Parameters:
        msg - The partial message
        msglen - The length of the partial message
      • digest

        public byte[] digest()
        Squeeze the Keccak sponge
      • digest

        public byte[] digest​(byte[] msg)
        Absorb the last part of the message and squeeze the Keccak sponge
        Parameters:
        msg - The rest of the message
      • digest

        public byte[] digest​(byte[] msg,
                             int msglen)
        Absorb the last part of the message and squeeze the Keccak sponge
        Parameters:
        msg - The rest of the message
        msglen - The length of the partial message