Sha256: e2227b47acef122b552e736282d782231ef2483e715f20ee3218f5692f012f4a

Contents?: true

Size: 302 Bytes

Versions: 7

Compression:

Stored size: 302 Bytes

Contents

# coding: utf-8
module Lanmao
  module Sign
    module RSA

      def self.sign(content, private_key)
        sign = private_key.sign('sha1', content.force_encoding("utf-8"))
        signature = Base64.encode64(sign)
        signature = signature.delete("\n").delete("\r")
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lanmao-0.8.0 lib/lanmao/sign/rsa.rb
lanmao-0.7.0 lib/lanmao/sign/rsa.rb
lanmao-0.6.0 lib/lanmao/sign/rsa.rb
lanmao-0.5.0 lib/lanmao/sign/rsa.rb
lanmao-0.4.0 lib/lanmao/sign/rsa.rb
lanmao-0.2.0 lib/lanmao/sign/rsa.rb
lanmao-0.1.0 lib/lanmao/sign/rsa.rb