meshtastic 0.0.39 → 0.0.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa504f8ade89178504929945de8d426f8a33d59f823148916fccc0f4760fdb6d
4
- data.tar.gz: e0972850468fd4b91badf6295890328c8f469fd0cdf98e17b45ad40617c76dae
3
+ metadata.gz: 9dc432f90a8545cad1027f5514f0676a60d776f617db87b394436e1657693e98
4
+ data.tar.gz: 5a461b32da2516b164ab789f2a27653b5f46a4f7d36020ddca1ba161931162e0
5
5
  SHA512:
6
- metadata.gz: c3910c79e13dc8a84eb5df0e80b96596746f147f417af3f273e33cbed4ea7ee4e1563fd602eedbc97e60d3a7a2b5a41751ac66a67e6437d3027c111c084c5285
7
- data.tar.gz: aaf6deaf8e117a42b9b56503cd15a6c1ade82ce2a0db4101cffcf0d685a8951cbf2b251c8b764e23ea483ba04e1f9a3987162bf345ddd4f52d96545b07e449e2
6
+ metadata.gz: 1094355139b2e703dda03bf60ff7034aeb94e1d7d335ba8cd73aae0d9c3bae4c64e61cfb3b8e2dcbdd8894174ab5e3f77b29fde04617fedc3f578b5e469a2678
7
+ data.tar.gz: d5677d5b337b4f1b8cbff41da88eafaeab8377f3235085f6ba2df384b7c19dd24cbece877d1d6c39f4cf3c4b9d6674f93ed6cb783bc62bd739e12379f3a8a552
@@ -59,6 +59,7 @@ module Meshtastic
59
59
  root_topic = opts[:root_topic] ||= 'msh'
60
60
  region = opts[:region] ||= 'US'
61
61
  channel = opts[:channel] ||= '2/e/LongFast/#'
62
+ # TODO: Support Array of PSKs and attempt each until decrypted
62
63
  psk = opts[:psk] ||= 'AQ=='
63
64
  qos = opts[:qos] ||= 0
64
65
  json = opts[:json] ||= false
@@ -74,7 +75,7 @@ module Meshtastic
74
75
  # Our AES key is 128 or 256 bits, shared as part of the 'Channel' specification.
75
76
 
76
77
  # Actual pre-shared key for LongFast channel
77
- psk = '1PG7OiApB1nwvP+rz05pAQ==' if channel.include?('LongFast')
78
+ psk = '1PG7OiApB1nwvP+rz05pAQ==' if psk == 'AQ=='
78
79
  padded_psk = psk.ljust(psk.length + ((4 - (psk.length % 4)) % 4), '=')
79
80
  replaced_psk = padded_psk.gsub('-', '+').gsub('_', '/')
80
81
  psk = replaced_psk
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.39'
4
+ VERSION = '0.0.40'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meshtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.39
4
+ version: 0.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.