route53/transport.py
def _hmac_sign_string(self, string_to_sign):
        """
        Route53 uses AWS an HMAC-based authentication scheme, involving the
        signing of a date string with the user's secret access key. More details
        on the specifics can be found in their documentation_.

        .. documentation:: http://docs.amazonwebservices.com/Route53/latest/DeveloperGuide/RESTAuthentication.html

        This method is used to sign said time string, for use in the request
        headers.


        :param str string_to_sign: The time string to sign.
        :rtype: str
        :returns: An HMAC signed string.
        """

        # Just use SHA256, since we're all running modern versions
        # of Python (right?).
        new_hmac = hmac.new(
            self.connection._aws_secret_access_key.encode('utf-8'),
            digestmod=hashlib.sha256
        )
        new_hmac.update(string_to_sign.encode('utf-8'))
        # The HMAC digest str is done at this point.
        digest = new_hmac.digest()
        # Now we have to Base64 encode it, and we're done.
        return base64.b64encode(digest).decode('utf-8')
def _hmac_sign_string(self, string_to_sign):
        """
        Route53 uses AWS an HMAC-based authentication scheme, involving the
        signing of a date string with the user's secret access key. More details
        on the specifics can be found in their documentation_.

        .. documentation:: http://docs.amazonwebservices.com/Route53/latest/DeveloperGuide/RESTAuthentication.html

        This method is used to sign said time string, for use in the request
        headers.


        :param str string_to_sign: The time string to sign.
        :rtype: str
        :returns: An HMAC signed string.
        """

        # Just use SHA256, since we're all running modern versions
        # of Python (right?).
        new_hmac = hmac.new(
            self.connection._aws_secret_access_key.encode('utf-8'),
            digestmod=hashlib.sha256
        )
        new_hmac.update(string_to_sign.encode('utf-8'))
        # The HMAC digest str is done at this point.
        digest = new_hmac.digest()
        # Now we have to Base64 encode it, and we're done.
        return base64.b64encode(digest).decode('utf-8')
Route53 uses AWS an HMAC-based authentication scheme, involving the
        signing of a date string with the user's secret access key. More details
        on the specifics can be found in their documentation_.

        .. documentation:: http://docs.amazonwebservices.com/Route53/latest/DeveloperGuide/RESTAuthentication.html

        This method is used to sign said time string, for use in the request
        headers.


        :param str string_to_sign: The time string to sign.
        :rtype: str
        :returns: An HMAC signed string.