Sha256: 61ca85a0dd9850bed172662a7a9f21a45a57c89d0ff40e080fc77171aaffe718

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

require 'net/ssh/transport/hmac/abstract'
require 'net/ssh/transport/gcm_cipher'

module Net::SSH::Transport
  ## Implements the aes256-gcm@openssh cipher
  class AES256_GCM
    extend ::Net::SSH::Transport::GCMCipher

    ## Implicit HMAC, do need to do anything
    class ImplicitHMac < ::Net::SSH::Transport::HMAC::Abstract
      def aead
        true
      end

      def key_length
        32
      end
    end

    def implicit_mac
      ImplicitHMac.new
    end

    def algo_name
      'aes-256-gcm'
    end

    def name
      'aes256-gcm@openssh.com'
    end

    #
    # --- RFC 5647 ---
    # K_LEN       AES key length                   32 octets
    #
    def self.key_length
      32
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
net-ssh-7.3.0 lib/net/ssh/transport/aes256_gcm.rb
net-ssh-7.3.0.rc1 lib/net/ssh/transport/aes256_gcm.rb