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

Safe HaskellNone

Network.HTTP.Rest.Signature.EC2

Contents

Synopsis

Re-exports

Types

Building signature

stringToSign :: Method -> Endpoint -> Path -> [(ByteString, ByteString)] -> ByteStringSource

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 -> [(ByteString, ByteString)] -> ByteStringSource

Make signature from a parameter list.