ronin-support 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -0
- data/.rubocop.yml +1 -2
- data/ChangeLog.md +23 -0
- data/README.md +3 -1
- data/gemspec.yml +4 -3
- data/lib/ronin/support/archive/core_ext/file.rb +1 -1
- data/lib/ronin/support/archive/core_ext.rb +1 -1
- data/lib/ronin/support/archive/mixin.rb +1 -1
- data/lib/ronin/support/archive/tar/reader.rb +1 -1
- data/lib/ronin/support/archive/tar/writer.rb +1 -1
- data/lib/ronin/support/archive/tar.rb +1 -1
- data/lib/ronin/support/archive/zip/reader/entry.rb +1 -1
- data/lib/ronin/support/archive/zip/reader/statistics.rb +1 -1
- data/lib/ronin/support/archive/zip/reader.rb +1 -1
- data/lib/ronin/support/archive/zip/writer.rb +1 -1
- data/lib/ronin/support/archive/zip.rb +1 -1
- data/lib/ronin/support/archive.rb +1 -1
- data/lib/ronin/support/binary/array.rb +1 -1
- data/lib/ronin/support/binary/bit_flip/core_ext/integer.rb +1 -1
- data/lib/ronin/support/binary/bit_flip/core_ext/string.rb +1 -1
- data/lib/ronin/support/binary/bit_flip/core_ext.rb +1 -1
- data/lib/ronin/support/binary/bit_flip.rb +1 -1
- data/lib/ronin/support/binary/buffer.rb +1 -1
- data/lib/ronin/support/binary/byte_slice.rb +2 -2
- data/lib/ronin/support/binary/core_ext/array.rb +1 -1
- data/lib/ronin/support/binary/core_ext/float.rb +1 -1
- data/lib/ronin/support/binary/core_ext/integer.rb +1 -1
- data/lib/ronin/support/binary/core_ext/io.rb +1 -1
- data/lib/ronin/support/binary/core_ext/string.rb +1 -1
- data/lib/ronin/support/binary/core_ext.rb +1 -1
- data/lib/ronin/support/binary/cstring.rb +1 -1
- data/lib/ronin/support/binary/ctypes/aggregate_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/arm/big_endian.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/arm.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/arm64/big_endian.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/arm64.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/mips/little_endian.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/mips.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/mips64/little_endian.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/mips64.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/ppc.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/ppc64.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/x86.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch/x86_64.rb +1 -1
- data/lib/ronin/support/binary/ctypes/arch.rb +1 -1
- data/lib/ronin/support/binary/ctypes/array_object_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/array_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/big_endian.rb +1 -1
- data/lib/ronin/support/binary/ctypes/char_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/char_types.rb +1 -1
- data/lib/ronin/support/binary/ctypes/enum_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/float32_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/float64_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/float_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/int16_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/int32_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/int64_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/int8_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/int_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/little_endian.rb +1 -1
- data/lib/ronin/support/binary/ctypes/mixin.rb +1 -1
- data/lib/ronin/support/binary/ctypes/native.rb +1 -1
- data/lib/ronin/support/binary/ctypes/network.rb +1 -1
- data/lib/ronin/support/binary/ctypes/object_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/android.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/apple_ios.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/bsd.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/freebsd.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/linux.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/macos.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/netbsd.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/openbsd.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/unix.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os/windows.rb +1 -1
- data/lib/ronin/support/binary/ctypes/os.rb +1 -1
- data/lib/ronin/support/binary/ctypes/scalar_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/string_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/struct_object_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/struct_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/type_resolver.rb +1 -1
- data/lib/ronin/support/binary/ctypes/uint16_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/uint32_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/uint64_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/uint8_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/uint_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/unbounded_array_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/union_object_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes/union_type.rb +1 -1
- data/lib/ronin/support/binary/ctypes.rb +1 -1
- data/lib/ronin/support/binary/memory.rb +1 -1
- data/lib/ronin/support/binary/packet.rb +1 -1
- data/lib/ronin/support/binary/stack.rb +1 -1
- data/lib/ronin/support/binary/stream/methods.rb +1 -1
- data/lib/ronin/support/binary/stream.rb +1 -1
- data/lib/ronin/support/binary/struct/member.rb +1 -1
- data/lib/ronin/support/binary/struct.rb +1 -1
- data/lib/ronin/support/binary/template.rb +1 -1
- data/lib/ronin/support/binary/unhexdump/core_ext/file.rb +1 -1
- data/lib/ronin/support/binary/unhexdump/core_ext/string.rb +1 -1
- data/lib/ronin/support/binary/unhexdump/core_ext.rb +1 -1
- data/lib/ronin/support/binary/unhexdump/parser.rb +1 -1
- data/lib/ronin/support/binary/unhexdump.rb +1 -1
- data/lib/ronin/support/binary/union.rb +1 -1
- data/lib/ronin/support/binary.rb +1 -1
- data/lib/ronin/support/cli/ansi.rb +1 -1
- data/lib/ronin/support/cli/io_shell/core_ext/io.rb +1 -1
- data/lib/ronin/support/cli/io_shell/core_ext.rb +1 -1
- data/lib/ronin/support/cli/io_shell.rb +1 -1
- data/lib/ronin/support/cli/printing.rb +1 -1
- data/lib/ronin/support/cli.rb +1 -1
- data/lib/ronin/support/compression/core_ext/file.rb +1 -1
- data/lib/ronin/support/compression/core_ext/string.rb +1 -1
- data/lib/ronin/support/compression/core_ext.rb +1 -1
- data/lib/ronin/support/compression/gzip/reader.rb +1 -1
- data/lib/ronin/support/compression/gzip/writer.rb +1 -1
- data/lib/ronin/support/compression/gzip.rb +1 -1
- data/lib/ronin/support/compression/mixin.rb +1 -1
- data/lib/ronin/support/compression/zlib.rb +1 -1
- data/lib/ronin/support/compression.rb +1 -1
- data/lib/ronin/support/core_ext/enumerable.rb +1 -1
- data/lib/ronin/support/core_ext/file.rb +1 -1
- data/lib/ronin/support/core_ext/integer.rb +1 -1
- data/lib/ronin/support/core_ext/ipaddr.rb +1 -1
- data/lib/ronin/support/core_ext/kernel.rb +1 -1
- data/lib/ronin/support/core_ext/string.rb +1 -1
- data/lib/ronin/support/core_ext.rb +1 -1
- data/lib/ronin/support/crypto/cert.rb +1 -1
- data/lib/ronin/support/crypto/cert_chain.rb +1 -1
- data/lib/ronin/support/crypto/cipher/aes.rb +1 -1
- data/lib/ronin/support/crypto/cipher/aes128.rb +1 -1
- data/lib/ronin/support/crypto/cipher/aes256.rb +1 -1
- data/lib/ronin/support/crypto/cipher.rb +2 -2
- data/lib/ronin/support/crypto/core_ext/file.rb +15 -9
- data/lib/ronin/support/crypto/core_ext/string.rb +17 -9
- data/lib/ronin/support/crypto/core_ext.rb +1 -1
- data/lib/ronin/support/crypto/hmac.rb +1 -1
- data/lib/ronin/support/crypto/key/dh.rb +1 -1
- data/lib/ronin/support/crypto/key/dsa.rb +1 -1
- data/lib/ronin/support/crypto/key/ec.rb +1 -1
- data/lib/ronin/support/crypto/key/methods.rb +1 -1
- data/lib/ronin/support/crypto/key/rsa.rb +1 -1
- data/lib/ronin/support/crypto/key.rb +1 -1
- data/lib/ronin/support/crypto/mixin.rb +40 -10
- data/lib/ronin/support/crypto/openssl.rb +1 -1
- data/lib/ronin/support/crypto.rb +10 -10
- data/lib/ronin/support/encoding/base16/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/base16/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/base16.rb +1 -1
- data/lib/ronin/support/encoding/base32/core_ext/string.rb +7 -7
- data/lib/ronin/support/encoding/base32/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/base32.rb +4 -4
- data/lib/ronin/support/encoding/base36/core_ext/integer.rb +4 -4
- data/lib/ronin/support/encoding/base36/core_ext/string.rb +4 -4
- data/lib/ronin/support/encoding/base36/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/base36.rb +4 -4
- data/lib/ronin/support/encoding/base62/core_ext/integer.rb +4 -4
- data/lib/ronin/support/encoding/base62/core_ext/string.rb +4 -4
- data/lib/ronin/support/encoding/base62/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/base62.rb +4 -4
- data/lib/ronin/support/encoding/base64/core_ext/string.rb +7 -7
- data/lib/ronin/support/encoding/base64/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/base64.rb +4 -4
- data/lib/ronin/support/encoding/c/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/c/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/c/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/c.rb +33 -34
- data/lib/ronin/support/encoding/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/hex/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/hex/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/hex/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/hex.rb +21 -22
- data/lib/ronin/support/encoding/html/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/html/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/html/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/html.rb +1 -1
- data/lib/ronin/support/encoding/http/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/http/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/http/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/http.rb +1 -1
- data/lib/ronin/support/encoding/js/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/js/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/js/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/js.rb +39 -39
- data/lib/ronin/support/encoding/powershell/core_ext/integer.rb +3 -1
- data/lib/ronin/support/encoding/powershell/core_ext/string.rb +7 -11
- data/lib/ronin/support/encoding/powershell/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/powershell.rb +26 -20
- data/lib/ronin/support/encoding/punycode/core_ext/string.rb +7 -7
- data/lib/ronin/support/encoding/punycode/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/punycode.rb +10 -10
- data/lib/ronin/support/encoding/quoted_printable/core_ext/string.rb +5 -7
- data/lib/ronin/support/encoding/quoted_printable/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/quoted_printable.rb +10 -10
- data/lib/ronin/support/encoding/ruby/core_ext/string.rb +2 -2
- data/lib/ronin/support/encoding/ruby/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/ruby.rb +13 -10
- data/lib/ronin/support/encoding/shell/core_ext/integer.rb +4 -4
- data/lib/ronin/support/encoding/shell/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/shell/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/shell.rb +33 -28
- data/lib/ronin/support/encoding/smtp.rb +1 -1
- data/lib/ronin/support/encoding/sql/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/sql/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/sql.rb +1 -1
- data/lib/ronin/support/encoding/uri/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/uri/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/uri/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/uri.rb +1 -1
- data/lib/ronin/support/encoding/uuencoding/core_ext/string.rb +5 -7
- data/lib/ronin/support/encoding/uuencoding/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/uuencoding.rb +10 -10
- data/lib/ronin/support/encoding/xml/core_ext/integer.rb +1 -1
- data/lib/ronin/support/encoding/xml/core_ext/string.rb +1 -1
- data/lib/ronin/support/encoding/xml/core_ext.rb +1 -1
- data/lib/ronin/support/encoding/xml.rb +1 -1
- data/lib/ronin/support/encoding.rb +1 -1
- data/lib/ronin/support/home.rb +1 -1
- data/lib/ronin/support/mixin.rb +1 -1
- data/lib/ronin/support/network/asn/dns_record.rb +1 -1
- data/lib/ronin/support/network/asn/list.rb +1 -1
- data/lib/ronin/support/network/asn/record.rb +1 -1
- data/lib/ronin/support/network/asn/record_set.rb +1 -1
- data/lib/ronin/support/network/asn.rb +1 -1
- data/lib/ronin/support/network/core_ext.rb +1 -1
- data/lib/ronin/support/network/dns/idn.rb +1 -1
- data/lib/ronin/support/network/dns/mixin.rb +1 -1
- data/lib/ronin/support/network/dns/resolver.rb +4 -2
- data/lib/ronin/support/network/dns.rb +1 -1
- data/lib/ronin/support/network/domain.rb +1 -1
- data/lib/ronin/support/network/email_address.rb +1 -1
- data/lib/ronin/support/network/esmtp/mixin.rb +1 -1
- data/lib/ronin/support/network/exceptions.rb +1 -1
- data/lib/ronin/support/network/ftp/mixin.rb +1 -1
- data/lib/ronin/support/network/host.rb +2 -2
- data/lib/ronin/support/network/http/cookie.rb +1 -1
- data/lib/ronin/support/network/http/core_ext/uri/http.rb +3 -3
- data/lib/ronin/support/network/http/core_ext.rb +1 -1
- data/lib/ronin/support/network/http/mixin.rb +1 -1
- data/lib/ronin/support/network/http/request.rb +1 -1
- data/lib/ronin/support/network/http/set_cookie.rb +1 -1
- data/lib/ronin/support/network/http/user_agents.rb +1 -1
- data/lib/ronin/support/network/http.rb +1 -1
- data/lib/ronin/support/network/imap/mixin.rb +1 -1
- data/lib/ronin/support/network/ip/mixin.rb +1 -1
- data/lib/ronin/support/network/ip.rb +1 -1
- data/lib/ronin/support/network/ip_range/cidr.rb +1 -1
- data/lib/ronin/support/network/ip_range/glob.rb +1 -1
- data/lib/ronin/support/network/ip_range/range.rb +1 -1
- data/lib/ronin/support/network/ip_range.rb +1 -1
- data/lib/ronin/support/network/mixin.rb +1 -1
- data/lib/ronin/support/network/packet.rb +1 -1
- data/lib/ronin/support/network/pop3/mixin.rb +1 -1
- data/lib/ronin/support/network/proxy.rb +1 -1
- data/lib/ronin/support/network/public_suffix/list.rb +1 -1
- data/lib/ronin/support/network/public_suffix/suffix.rb +1 -1
- data/lib/ronin/support/network/public_suffix/suffix_set.rb +1 -1
- data/lib/ronin/support/network/public_suffix.rb +1 -1
- data/lib/ronin/support/network/smtp/email.rb +1 -1
- data/lib/ronin/support/network/smtp/mixin.rb +1 -1
- data/lib/ronin/support/network/smtp.rb +1 -1
- data/lib/ronin/support/network/ssl/local_cert.rb +1 -1
- data/lib/ronin/support/network/ssl/local_key.rb +1 -1
- data/lib/ronin/support/network/ssl/mixin.rb +1 -1
- data/lib/ronin/support/network/ssl/openssl.rb +1 -1
- data/lib/ronin/support/network/ssl/proxy.rb +1 -1
- data/lib/ronin/support/network/ssl.rb +1 -1
- data/lib/ronin/support/network/tcp/mixin.rb +1 -1
- data/lib/ronin/support/network/tcp/proxy.rb +1 -1
- data/lib/ronin/support/network/tcp.rb +1 -1
- data/lib/ronin/support/network/telnet/mixin.rb +1 -1
- data/lib/ronin/support/network/telnet.rb +1 -1
- data/lib/ronin/support/network/tld/list.rb +1 -1
- data/lib/ronin/support/network/tld.rb +1 -1
- data/lib/ronin/support/network/tls/mixin.rb +1 -1
- data/lib/ronin/support/network/tls/proxy.rb +1 -1
- data/lib/ronin/support/network/tls.rb +1 -1
- data/lib/ronin/support/network/udp/mixin.rb +1 -1
- data/lib/ronin/support/network/udp/proxy.rb +1 -1
- data/lib/ronin/support/network/udp.rb +1 -1
- data/lib/ronin/support/network/unix/mixin.rb +1 -1
- data/lib/ronin/support/network/wildcard.rb +1 -1
- data/lib/ronin/support/network.rb +1 -1
- data/lib/ronin/support/path.rb +1 -1
- data/lib/ronin/support/text/core_ext/regexp.rb +1 -1
- data/lib/ronin/support/text/core_ext/string.rb +1 -1
- data/lib/ronin/support/text/core_ext.rb +1 -1
- data/lib/ronin/support/text/entropy/core_ext/string.rb +1 -1
- data/lib/ronin/support/text/entropy/core_ext.rb +1 -1
- data/lib/ronin/support/text/entropy.rb +1 -1
- data/lib/ronin/support/text/erb/mixin.rb +1 -1
- data/lib/ronin/support/text/erb.rb +1 -1
- data/lib/ronin/support/text/homoglyph/core_ext/string.rb +1 -1
- data/lib/ronin/support/text/homoglyph/core_ext.rb +1 -1
- data/lib/ronin/support/text/homoglyph/exceptions.rb +1 -1
- data/lib/ronin/support/text/homoglyph/table.rb +1 -1
- data/lib/ronin/support/text/homoglyph.rb +1 -1
- data/lib/ronin/support/text/mixin.rb +1 -1
- data/lib/ronin/support/text/patterns/credentials.rb +1 -1
- data/lib/ronin/support/text/patterns/crypto.rb +1 -1
- data/lib/ronin/support/text/patterns/file_system.rb +1 -1
- data/lib/ronin/support/text/patterns/language.rb +1 -1
- data/lib/ronin/support/text/patterns/network/public_suffix.rb +1 -1
- data/lib/ronin/support/text/patterns/network.rb +1 -1
- data/lib/ronin/support/text/patterns/numeric.rb +2 -2
- data/lib/ronin/support/text/patterns/pii.rb +1 -1
- data/lib/ronin/support/text/patterns/source_code.rb +1 -1
- data/lib/ronin/support/text/patterns.rb +1 -1
- data/lib/ronin/support/text/random/mixin.rb +1 -1
- data/lib/ronin/support/text/random.rb +1 -1
- data/lib/ronin/support/text/typo/core_ext/string.rb +1 -1
- data/lib/ronin/support/text/typo/core_ext.rb +1 -1
- data/lib/ronin/support/text/typo/exceptions.rb +1 -1
- data/lib/ronin/support/text/typo/generator.rb +1 -1
- data/lib/ronin/support/text/typo.rb +1 -1
- data/lib/ronin/support/text.rb +1 -1
- data/lib/ronin/support/version.rb +2 -2
- data/lib/ronin/support.rb +1 -1
- metadata +18 -4
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -94,7 +94,7 @@ module Ronin
|
|
94
94
|
elsif key
|
95
95
|
self.key = key
|
96
96
|
else
|
97
|
-
raise(ArgumentError,"the
|
97
|
+
raise(ArgumentError,"the key: or password: keyword argument must be given")
|
98
98
|
end
|
99
99
|
|
100
100
|
self.iv = iv if iv
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -200,7 +200,7 @@ class File
|
|
200
200
|
# @param [Hash{Symbol => Object}] kwargs
|
201
201
|
# Additional keyword arguments for {Ronin::Support::Crypto.cipher}.
|
202
202
|
#
|
203
|
-
# @option kwargs [Symbol] :hash (:
|
203
|
+
# @option kwargs [Symbol] :hash (:sha256)
|
204
204
|
# The algorithm to hash the `:password`.
|
205
205
|
#
|
206
206
|
# @option kwargs [String] :key
|
@@ -261,7 +261,7 @@ class File
|
|
261
261
|
# @param [Hash{Symbol => Object}] kwargs
|
262
262
|
# Additional keyword arguments for {Ronin::Support::Crypto.cipher}.
|
263
263
|
#
|
264
|
-
# @option kwargs [Symbol] :hash (:
|
264
|
+
# @option kwargs [Symbol] :hash (:sha256)
|
265
265
|
# The algorithm to hash the `:password`.
|
266
266
|
#
|
267
267
|
# @option kwargs [String] :key
|
@@ -344,7 +344,7 @@ class File
|
|
344
344
|
# The encrypted data.
|
345
345
|
#
|
346
346
|
# @raise [ArgumentError]
|
347
|
-
# Either the
|
347
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
348
348
|
#
|
349
349
|
# @example
|
350
350
|
# File.aes_encrypt('file.txt', key_size: 256, password: 's3cr3t')
|
@@ -400,7 +400,7 @@ class File
|
|
400
400
|
# The encrypted data.
|
401
401
|
#
|
402
402
|
# @raise [ArgumentError]
|
403
|
-
# Either the
|
403
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
404
404
|
#
|
405
405
|
# @example
|
406
406
|
# File.aes_decrypt('encrypted.bin', key_size: 256, password: 's3cr3t')
|
@@ -453,7 +453,7 @@ class File
|
|
453
453
|
# The encrypted data.
|
454
454
|
#
|
455
455
|
# @raise [ArgumentError]
|
456
|
-
# Either the
|
456
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
457
457
|
#
|
458
458
|
# @example
|
459
459
|
# File.aes128_encrypt('file.txt', password: 's3cr3t')
|
@@ -506,7 +506,7 @@ class File
|
|
506
506
|
# The encrypted data.
|
507
507
|
#
|
508
508
|
# @raise [ArgumentError]
|
509
|
-
# Either the
|
509
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
510
510
|
#
|
511
511
|
# @example
|
512
512
|
# File.aes256_decrypt('encrypted.bin', password: 's3cr3t')
|
@@ -559,7 +559,7 @@ class File
|
|
559
559
|
# The encrypted data.
|
560
560
|
#
|
561
561
|
# @raise [ArgumentError]
|
562
|
-
# Either the
|
562
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
563
563
|
#
|
564
564
|
# @example
|
565
565
|
# File.aes256_encrypt('file.txt', password: 's3cr3t')
|
@@ -612,7 +612,7 @@ class File
|
|
612
612
|
# The encrypted data.
|
613
613
|
#
|
614
614
|
# @raise [ArgumentError]
|
615
|
-
# Either the
|
615
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
616
616
|
#
|
617
617
|
# @example
|
618
618
|
# File.aes256_decrypt('encrypted.bin', password: 's3cr3t')
|
@@ -630,6 +630,9 @@ class File
|
|
630
630
|
#
|
631
631
|
# Encrypts the file using the given RSA key.
|
632
632
|
#
|
633
|
+
# @param [String] path
|
634
|
+
# The path to the file.
|
635
|
+
#
|
633
636
|
# @param [Hash{Symbol => Object}] kwargs
|
634
637
|
# Additional keyword arguments for {Ronin::Support::Crypto.rsa_encrypt}.
|
635
638
|
#
|
@@ -661,6 +664,9 @@ class File
|
|
661
664
|
#
|
662
665
|
# Decrypts the file using the given RSA key.
|
663
666
|
#
|
667
|
+
# @param [String] path
|
668
|
+
# The path to the file.
|
669
|
+
#
|
664
670
|
# @param [Hash{Symbol => Object}] kwargs
|
665
671
|
# Additional keyword arguments for {Ronin::Support::Crypto.rsa_decrypt}.
|
666
672
|
#
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -22,6 +22,8 @@ require 'digest'
|
|
22
22
|
|
23
23
|
class String
|
24
24
|
|
25
|
+
#
|
26
|
+
# Calculates the MD5 checksum of the String.
|
25
27
|
#
|
26
28
|
# @return [String]
|
27
29
|
# The MD5 checksum of the String.
|
@@ -36,6 +38,8 @@ class String
|
|
36
38
|
Digest::MD5.hexdigest(self)
|
37
39
|
end
|
38
40
|
|
41
|
+
#
|
42
|
+
# Calculates the SHA1 checksum of the String.
|
39
43
|
#
|
40
44
|
# @return [String]
|
41
45
|
# The SHA1 checksum of the String.
|
@@ -52,6 +56,8 @@ class String
|
|
52
56
|
|
53
57
|
alias sha128 sha1
|
54
58
|
|
59
|
+
#
|
60
|
+
# Calculates the SHA256 checksum of the String.
|
55
61
|
#
|
56
62
|
# @return [String]
|
57
63
|
# The SHA256 checksum of the String.
|
@@ -68,6 +74,8 @@ class String
|
|
68
74
|
|
69
75
|
alias sha2 sha256
|
70
76
|
|
77
|
+
#
|
78
|
+
# Calculates the SHA512 checksum of the String.
|
71
79
|
#
|
72
80
|
# @return [String]
|
73
81
|
# The SHA512 checksum of the String.
|
@@ -134,7 +142,7 @@ class String
|
|
134
142
|
# @param [Hash{Symbol => Object}] kwargs
|
135
143
|
# Additional keyword arguments for {Ronin::Support::Crypto.cipher}.
|
136
144
|
#
|
137
|
-
# @option kwargs [Symbol] :hash (:
|
145
|
+
# @option kwargs [Symbol] :hash (:sha256)
|
138
146
|
# The algorithm to hash the `:password`.
|
139
147
|
#
|
140
148
|
# @option kwargs [String] :key
|
@@ -177,7 +185,7 @@ class String
|
|
177
185
|
# @param [Hash{Symbol => Object}] kwargs
|
178
186
|
# Additional keyword arguments for {Ronin::Support::Crypto.cipher}.
|
179
187
|
#
|
180
|
-
# @option kwargs [Symbol] :hash (:
|
188
|
+
# @option kwargs [Symbol] :hash (:sha256)
|
181
189
|
# The algorithm to hash the `:password`.
|
182
190
|
#
|
183
191
|
# @option kwargs [String] :key
|
@@ -242,7 +250,7 @@ class String
|
|
242
250
|
# The encrypted data.
|
243
251
|
#
|
244
252
|
# @raise [ArgumentError]
|
245
|
-
# Either the
|
253
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
246
254
|
#
|
247
255
|
# @example
|
248
256
|
# "top secret".aes_encrypt(key_size: 256, password: 's3cr3t')
|
@@ -285,7 +293,7 @@ class String
|
|
285
293
|
# The encrypted data.
|
286
294
|
#
|
287
295
|
# @raise [ArgumentError]
|
288
|
-
# Either the
|
296
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
289
297
|
#
|
290
298
|
# @example
|
291
299
|
# "\xF0[\x17\xDA\xA2\x82\x93\xF4\xB6s\xB5\xD8\x1F\xF2\xC6\\".aes_decrypt(key_size: 256, password: 's3cr3t')
|
@@ -325,7 +333,7 @@ class String
|
|
325
333
|
# The encrypted data.
|
326
334
|
#
|
327
335
|
# @raise [ArgumentError]
|
328
|
-
# Either the
|
336
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
329
337
|
#
|
330
338
|
# @example
|
331
339
|
# "top secret".aes128_encrypt(password: 's3cr3t')
|
@@ -365,7 +373,7 @@ class String
|
|
365
373
|
# The encrypted data.
|
366
374
|
#
|
367
375
|
# @raise [ArgumentError]
|
368
|
-
# Either the
|
376
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
369
377
|
#
|
370
378
|
# @example
|
371
379
|
# "\x88\xA53\xE9|\xE2\x8E\xA0\xABv\xCF\x94\x17\xBB*\xC5".aes128_decrypt(password: 's3cr3t')
|
@@ -405,7 +413,7 @@ class String
|
|
405
413
|
# The encrypted data.
|
406
414
|
#
|
407
415
|
# @raise [ArgumentError]
|
408
|
-
# Either the
|
416
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
409
417
|
#
|
410
418
|
# @example
|
411
419
|
# "top secret".aes256_encrypt(password: 's3cr3t')
|
@@ -445,7 +453,7 @@ class String
|
|
445
453
|
# The encrypted data.
|
446
454
|
#
|
447
455
|
# @raise [ArgumentError]
|
448
|
-
# Either the
|
456
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
449
457
|
#
|
450
458
|
# @example
|
451
459
|
# "\xF0[\x17\xDA\xA2\x82\x93\xF4\xB6s\xB5\xD8\x1F\xF2\xC6\\".aes256_decrypt(password: 's3cr3t')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -109,7 +109,7 @@ module Ronin
|
|
109
109
|
# The newly created cipher.
|
110
110
|
#
|
111
111
|
# @raise [ArgumentError]
|
112
|
-
# Either the
|
112
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
113
113
|
#
|
114
114
|
# @example
|
115
115
|
# crypto_cipher('aes-128-cbc', mode: :encrypt, key 'secret'.md5)
|
@@ -135,11 +135,26 @@ module Ronin
|
|
135
135
|
# @param [Hash{Symbol => Object}] kwargs
|
136
136
|
# Additional keyword arguments for {cipher}.
|
137
137
|
#
|
138
|
+
# @option kwargs [Symbol] :hash (:sha256)
|
139
|
+
# The algorithm to hash the `:password`.
|
140
|
+
#
|
141
|
+
# @option kwargs [String] :key
|
142
|
+
# The secret key to use.
|
143
|
+
#
|
144
|
+
# @option kwargs [String] :password
|
145
|
+
# The password for the cipher.
|
146
|
+
#
|
147
|
+
# @option kwargs [String] :iv
|
148
|
+
# The optional Initial Vector (IV).
|
149
|
+
#
|
150
|
+
# @option kwargs [Integer] :padding
|
151
|
+
# Sets the padding for the cipher.
|
152
|
+
#
|
138
153
|
# @return [String]
|
139
154
|
# The encrypted data.
|
140
155
|
#
|
141
156
|
# @raise [ArgumentError]
|
142
|
-
# Either the
|
157
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
143
158
|
#
|
144
159
|
# @see Crypto.encrypt
|
145
160
|
#
|
@@ -161,11 +176,26 @@ module Ronin
|
|
161
176
|
# @param [Hash{Symbol => Object}] kwargs
|
162
177
|
# Additional keyword arguments for {cipher}.
|
163
178
|
#
|
179
|
+
# @option kwargs [Symbol] :hash (:sha256)
|
180
|
+
# The algorithm to hash the `:password`.
|
181
|
+
#
|
182
|
+
# @option kwargs [String] :key
|
183
|
+
# The secret key to use.
|
184
|
+
#
|
185
|
+
# @option kwargs [String] :password
|
186
|
+
# The password for the cipher.
|
187
|
+
#
|
188
|
+
# @option kwargs [String] :iv
|
189
|
+
# The optional Initial Vector (IV).
|
190
|
+
#
|
191
|
+
# @option kwargs [Integer] :padding
|
192
|
+
# Sets the padding for the cipher.
|
193
|
+
#
|
164
194
|
# @return [String]
|
165
195
|
# The decrypted data.
|
166
196
|
#
|
167
197
|
# @raise [ArgumentError]
|
168
|
-
# Either the
|
198
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
169
199
|
#
|
170
200
|
# @see Crypto.decrypt
|
171
201
|
#
|
@@ -251,7 +281,7 @@ module Ronin
|
|
251
281
|
# The encrypted data.
|
252
282
|
#
|
253
283
|
# @raise [ArgumentError]
|
254
|
-
# Either the
|
284
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
255
285
|
#
|
256
286
|
# @see Crypto.aes_encrypt
|
257
287
|
#
|
@@ -295,7 +325,7 @@ module Ronin
|
|
295
325
|
# The encrypted data.
|
296
326
|
#
|
297
327
|
# @raise [ArgumentError]
|
298
|
-
# Either the
|
328
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
299
329
|
#
|
300
330
|
# @see Crypto.aes_decrypt
|
301
331
|
#
|
@@ -375,7 +405,7 @@ module Ronin
|
|
375
405
|
# The encrypted data.
|
376
406
|
#
|
377
407
|
# @raise [ArgumentError]
|
378
|
-
# Either the
|
408
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
379
409
|
#
|
380
410
|
# @see Crypto.aes128_encrypt
|
381
411
|
#
|
@@ -416,7 +446,7 @@ module Ronin
|
|
416
446
|
# The encrypted data.
|
417
447
|
#
|
418
448
|
# @raise [ArgumentError]
|
419
|
-
# Either the
|
449
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
420
450
|
#
|
421
451
|
# @see Crypto.aes128_decrypt
|
422
452
|
#
|
@@ -496,7 +526,7 @@ module Ronin
|
|
496
526
|
# The encrypted data.
|
497
527
|
#
|
498
528
|
# @raise [ArgumentError]
|
499
|
-
# Either the
|
529
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
500
530
|
#
|
501
531
|
# @see Crypto.aes256_encrypt
|
502
532
|
#
|
@@ -537,7 +567,7 @@ module Ronin
|
|
537
567
|
# The encrypted data.
|
538
568
|
#
|
539
569
|
# @raise [ArgumentError]
|
540
|
-
# Either the
|
570
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
541
571
|
#
|
542
572
|
# @see Crypto.aes256_decrypt
|
543
573
|
#
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
data/lib/ronin/support/crypto.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# Ronin Support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -199,7 +199,7 @@ module Ronin
|
|
199
199
|
# The newly created cipher.
|
200
200
|
#
|
201
201
|
# @raise [ArgumentError]
|
202
|
-
# Either the
|
202
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
203
203
|
#
|
204
204
|
# @example
|
205
205
|
# Crypto.cipher('aes-128-cbc', direction: :encrypt, key 'secret'.md5)
|
@@ -242,7 +242,7 @@ module Ronin
|
|
242
242
|
# The encrypted data.
|
243
243
|
#
|
244
244
|
# @raise [ArgumentError]
|
245
|
-
# Either the
|
245
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
246
246
|
#
|
247
247
|
# @see Cipher#encrypt
|
248
248
|
#
|
@@ -281,7 +281,7 @@ module Ronin
|
|
281
281
|
# The decrypted data.
|
282
282
|
#
|
283
283
|
# @raise [ArgumentError]
|
284
|
-
# Either the
|
284
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
285
285
|
#
|
286
286
|
# @see Cipher#decrypt
|
287
287
|
#
|
@@ -363,7 +363,7 @@ module Ronin
|
|
363
363
|
# The encrypted data.
|
364
364
|
#
|
365
365
|
# @raise [ArgumentError]
|
366
|
-
# Either the
|
366
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
367
367
|
#
|
368
368
|
def self.aes_encrypt(data,**kwargs)
|
369
369
|
self.aes_cipher(direction: :encrypt, **kwargs).encrypt(data)
|
@@ -403,7 +403,7 @@ module Ronin
|
|
403
403
|
# The encrypted data.
|
404
404
|
#
|
405
405
|
# @raise [ArgumentError]
|
406
|
-
# Either the
|
406
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
407
407
|
#
|
408
408
|
def self.aes_decrypt(data,**kwargs)
|
409
409
|
self.aes_cipher(direction: :decrypt, **kwargs).decrypt(data)
|
@@ -477,7 +477,7 @@ module Ronin
|
|
477
477
|
# The encrypted data.
|
478
478
|
#
|
479
479
|
# @raise [ArgumentError]
|
480
|
-
# Either the
|
480
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
481
481
|
#
|
482
482
|
def self.aes128_encrypt(data,**kwargs)
|
483
483
|
self.aes128_cipher(direction: :encrypt, **kwargs).encrypt(data)
|
@@ -514,7 +514,7 @@ module Ronin
|
|
514
514
|
# The encrypted data.
|
515
515
|
#
|
516
516
|
# @raise [ArgumentError]
|
517
|
-
# Either the
|
517
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
518
518
|
#
|
519
519
|
def self.aes128_decrypt(data,**kwargs)
|
520
520
|
self.aes128_cipher(direction: :decrypt, **kwargs).decrypt(data)
|
@@ -588,7 +588,7 @@ module Ronin
|
|
588
588
|
# The encrypted data.
|
589
589
|
#
|
590
590
|
# @raise [ArgumentError]
|
591
|
-
# Either the
|
591
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
592
592
|
#
|
593
593
|
def self.aes256_encrypt(data,**kwargs)
|
594
594
|
self.aes256_cipher(direction: :encrypt, **kwargs).encrypt(data)
|
@@ -625,7 +625,7 @@ module Ronin
|
|
625
625
|
# The encrypted data.
|
626
626
|
#
|
627
627
|
# @raise [ArgumentError]
|
628
|
-
# Either the
|
628
|
+
# Either the `key:` or `password:` keyword argument must be given.
|
629
629
|
#
|
630
630
|
def self.aes256_decrypt(data,**kwargs)
|
631
631
|
self.aes256_cipher(direction: :decrypt, **kwargs).decrypt(data)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|
@@ -21,9 +21,7 @@ require 'ronin/support/encoding/base32'
|
|
21
21
|
class String
|
22
22
|
|
23
23
|
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
# [Base32]: https://en.wikipedia.org/wiki/Base32
|
24
|
+
# Base32 encodes the String.
|
27
25
|
#
|
28
26
|
# @return [String]
|
29
27
|
# The Base32 encoded String.
|
@@ -32,6 +30,8 @@ class String
|
|
32
30
|
# "The quick brown fox jumps over the lazy dog".base32_encode
|
33
31
|
# # => "KRUGKIDROVUWG2ZAMJZG653OEBTG66BANJ2W24DTEBXXMZLSEB2GQZJANRQXU6JAMRXWO==="
|
34
32
|
#
|
33
|
+
# @see https://en.wikipedia.org/wiki/Base32
|
34
|
+
#
|
35
35
|
# @api public
|
36
36
|
#
|
37
37
|
# @since 1.0.0
|
@@ -41,9 +41,7 @@ class String
|
|
41
41
|
end
|
42
42
|
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# [Base32]: https://en.wikipedia.org/wiki/Base32
|
44
|
+
# Base32 decodes the String.
|
47
45
|
#
|
48
46
|
# @return [String]
|
49
47
|
# The Base32 decodes String.
|
@@ -52,6 +50,8 @@ class String
|
|
52
50
|
# "KRUGKIDROVUWG2ZAMJZG653OEBTG66BANJ2W24DTEBXXMZLSEB2GQZJANRQXU6JAMRXWO===".base32_decode
|
53
51
|
# # => "The quick brown fox jumps over the lazy dog"
|
54
52
|
#
|
53
|
+
# @see https://en.wikipedia.org/wiki/Base32
|
54
|
+
#
|
55
55
|
# @api public
|
56
56
|
#
|
57
57
|
# @since 1.0.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright (c) 2006-
|
3
|
+
# Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
4
|
#
|
5
5
|
# ronin-support is free software: you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU Lesser General Public License as published
|