Class DigestProvider.DigestSupport

    • Method Detail

      • digest

        public Single<String> digest​(byte[] bytes,
                                     boolean preHashed)
        Generates a signature or an HMAC.
        Parameters:
        bytes - bytes to sign
        preHashed - whether the bytes are pre-hashed
        Returns:
        future with the digest (signature or HMAC)
      • verify

        public Single<Boolean> verify​(byte[] bytes,
                                      boolean preHashed,
                                      String digest)
        Verifies a signature or an HMAC.
        Parameters:
        bytes - bytes to verify
        preHashed - whether the bytes are pre-hashed
        digest - digest obtained from a third-part
        Returns:
        future with true if the digest is valid, false if not valid, and an error if not a supported digest