> +    }
> +
> +    byte[] hmacSHA256(String toSign, byte[] key) {
> +        try {
> +            ByteProcessor<byte[]> hmacSHA256 = 
> asByteProcessor(crypto.hmacSHA256(key));
> +            return readBytes(toInputStream(toSign), hmacSHA256);
> +        } catch (IOException e) {
> +            throw new HttpException("read bytes error", e);
> +        } catch (InvalidKeyException e) {
> +            throw new HttpException("invalid key", e);
> +        }
> +    }
> +
> +    protected byte[] hash(InputStream input) throws HTTPException {
> +        try {
> +            MessageDigest md = MessageDigest.getInstance("SHA-256");

ok. Hashing.sha256 is same as MessageDigest

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/678/files#r24555082

Reply via email to