ec2-signature-3.1: The Amazon EC2 style signature calculator.

Safe HaskellNone
LanguageHaskell98

Network.HTTP.Rest.Signature.EC2

Contents

Synopsis

Types

Building signature

stringToSign :: Method -> Endpoint -> Path -> SimpleQuery -> ByteString Source

Make a string for making signature.

>>> stringToSign "GET" "ec2.amazonaws.com" "/" [("key1", "value1"), ("key2", "value2")]
"GET\nec2.amazonaws.com\n/\nkey1=value1&key2=value2"

signature :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> SimpleQuery -> ByteString Source

Make signature from a parameter list.

signature' :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> Query -> ByteString Source

Make signature from a QueryString.