def message_digest_key_set(keyid, algtype, enctype, enc)
      current_keyid = message_digest_key_id
      if keyid == default_message_digest_key_id && current_keyid != keyid
        config_set('interface_ospf', 'message_digest_key_set',
                   @interface.name, 'no', current_keyid,
                   '', '', '')
      elsif keyid != default_message_digest_key_id
        fail TypeError unless enc.is_a?(String)
        fail ArgumentError unless enc.length > 0
        enctype = Encryption.symbol_to_cli(enctype)
        config_set('interface_ospf', 'message_digest_key_set',
                   @interface.name, '', keyid, algtype, enctype, enc)
      end
    end
def message_digest_key_set(keyid, algtype, enctype, enc)
      current_keyid = message_digest_key_id
      if keyid == default_message_digest_key_id && current_keyid != keyid
        config_set('interface_ospf', 'message_digest_key_set',
                   @interface.name, 'no', current_keyid,
                   '', '', '')
      elsif keyid != default_message_digest_key_id
        fail TypeError unless enc.is_a?(String)
        fail ArgumentError unless enc.length > 0
        enctype = Encryption.symbol_to_cli(enctype)
        config_set('interface_ospf', 'message_digest_key_set',
                   @interface.name, '', keyid, algtype, enctype, enc)
      end
    end
interface %s
   %s ip ospf message-digest-key %d %s %d %s