ip_anonymizer 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f454e201a3d9c2f4289e2b0c6e367bffbed093f74dbcc6feeb1325ca39aa7a84
4
- data.tar.gz: 312f1dcaf7e753febe323c9aed56b5847d1c1bfba84a2231fa79b73e34d8ec5a
3
+ metadata.gz: af1bd685868d3087586ced74f22aee0a57037404da56ae64093ed178876a564b
4
+ data.tar.gz: 70c18e9ef44c944397e0a5b393ba9ca27a2147d270a8b18cbbecb0025c0d8ccd
5
5
  SHA512:
6
- metadata.gz: 8e5ad0bba1c72b3753e4b9218af6139df2cc0833cb3334e7b508740771ae6d3e3201773674ee2442d242807bf943cd46d93e75ce85271fb8a13fb7e499245ea0
7
- data.tar.gz: e800b290819f4854464d21bd73451a2a5c39ea5598155267323c34a59552f3efb1139eb4881b2a2e952f08b4435c07e2113ababf85061da9e399d9d89365fa38
6
+ metadata.gz: '09edb477328ec455b307dec851752e7c407782d7c61c71394e465cfdb7721b1976355977ce4b5be8183213ccc5c75e9fbb516ed3b85788509e81cdeffdf72c2a'
7
+ data.tar.gz: 137dc1ae58c4c1b4c2800d8c684d48bac9b6abd644326d378f0a3d92549ebd92d05b6c3245d3d4464d96086d19c49129293f10b1366967980a68cb982d5986c8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.4.0 (2026-04-07)
2
+
3
+ - Dropped support for Ruby < 3.3
4
+
5
+ ## 0.3.0 (2024-06-24)
6
+
7
+ - Dropped support for Ruby < 3.1
8
+
1
9
  ## 0.2.0 (2022-10-09)
2
10
 
3
11
  - Dropped support for Ruby < 2.7
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018-2022 Andrew Kane
3
+ Copyright (c) 2018-2026 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -6,7 +6,7 @@ Works with IPv4 and IPv6
6
6
 
7
7
  Designed to help with [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) compliance
8
8
 
9
- [![Build Status](https://github.com/ankane/ip_anonymizer/workflows/build/badge.svg?branch=master)](https://github.com/ankane/ip_anonymizer/actions)
9
+ [![Build Status](https://github.com/ankane/ip_anonymizer/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/ip_anonymizer/actions)
10
10
 
11
11
  ## Getting Started
12
12
 
@@ -1,3 +1,3 @@
1
1
  module IpAnonymizer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/ip_anonymizer.rb CHANGED
@@ -3,9 +3,9 @@ require "ipaddr"
3
3
  require "openssl"
4
4
 
5
5
  # modules
6
- require "ip_anonymizer/hash_ip"
7
- require "ip_anonymizer/mask_ip"
8
- require "ip_anonymizer/version"
6
+ require_relative "ip_anonymizer/hash_ip"
7
+ require_relative "ip_anonymizer/mask_ip"
8
+ require_relative "ip_anonymizer/version"
9
9
 
10
10
  module IpAnonymizer
11
11
  def self.mask_ip(ip)
@@ -24,7 +24,7 @@ module IpAnonymizer
24
24
  key_len = addr.ipv4? ? 4 : 16
25
25
  family = addr.ipv4? ? Socket::AF_INET : Socket::AF_INET6
26
26
 
27
- keyed_hash = OpenSSL::PKCS5.pbkdf2_hmac(addr.to_s, key, iterations, key_len, "sha256")
28
- IPAddr.new(keyed_hash.bytes.inject {|a, b| (a << 8) + b }, family).to_s
27
+ keyed_hash = OpenSSL::KDF.pbkdf2_hmac(addr.to_s, salt: key, iterations: iterations, length: key_len, hash: "sha256")
28
+ IPAddr.new(keyed_hash.bytes.inject { |a, b| (a << 8) + b }, family).to_s
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ip_anonymizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-10-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email: andrew@ankane.org
15
13
  executables: []
16
14
  extensions: []
@@ -27,7 +25,6 @@ homepage: https://github.com/ankane/ip_anonymizer
27
25
  licenses:
28
26
  - MIT
29
27
  metadata: {}
30
- post_install_message:
31
28
  rdoc_options: []
32
29
  require_paths:
33
30
  - lib
@@ -35,15 +32,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
35
32
  requirements:
36
33
  - - ">="
37
34
  - !ruby/object:Gem::Version
38
- version: '2.7'
35
+ version: '3.3'
39
36
  required_rubygems_version: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
40
  version: '0'
44
41
  requirements: []
45
- rubygems_version: 3.3.7
46
- signing_key:
42
+ rubygems_version: 4.0.6
47
43
  specification_version: 4
48
44
  summary: IP address anonymizer for Ruby and Rails
49
45
  test_files: []