Module: Aws::CloudFront::Signer

Included in:
CookieSigner, UrlSigner
Defined in:
gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/signer.rb

Instance Method Summary collapse

Instance Method Details

#initialize(options = {}) ⇒ Object

Parameters:

  • options (Hash) (defaults to: {}) —

    a customizable set of options

Options Hash (options):

  • :key_pair_id (String)
  • :private_key (String)
  • :private_key_path (String)
  • :hash_algorithm (String) — default: 'SHA1' —

    'SHA1' or 'SHA256'



18
19
20
21
22
23
# File 'gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/signer.rb', line 18

def initialize(options = {})
  @key_pair_id = key_pair_id(options)
  @hash_algorithm = hash_algorithm(options)
  @cipher = OpenSSL::Digest.new(@hash_algorithm)
  @private_key = load_private_key(private_key(options))
end