reqsign-aws-core 3.2.0

Shared AWS credential and request canonicalization support for reqsign.
Documentation
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#![doc = include_str!("../README.md")]

pub mod constants;

#[doc(hidden)]
pub mod assume_role;
pub use assume_role::AssumeRoleGrant;

mod credential;
pub use credential::Credential;

mod provide_credential;
pub use provide_credential::*;

#[doc(hidden)]
pub mod signing;

pub const EMPTY_STRING_SHA256: &str =
    "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";

#[cfg(test)]
mod tests {
    use reqsign_core::hash::hex_sha256;

    use super::EMPTY_STRING_SHA256;

    #[test]
    fn empty_string_sha256_matches_computed_digest() {
        assert_eq!(EMPTY_STRING_SHA256, hex_sha256(b""));
        assert_eq!(
            EMPTY_STRING_SHA256,
            "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
        );
    }
}