opensecret 0.0.962 → 0.0.988

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -10
  3. data/bin/opensecret +3 -4
  4. data/bin/ops +5 -0
  5. data/lib/extension/string.rb +114 -0
  6. data/lib/factbase/facts.opensecret.io.ini +9 -21
  7. data/lib/interprete/begin.rb +232 -0
  8. data/lib/interprete/cmd.rb +621 -0
  9. data/lib/{plugins/usecases/unlock.rb → interprete/export.rb} +25 -70
  10. data/lib/interprete/init.rb +205 -0
  11. data/lib/interprete/key.rb +119 -0
  12. data/lib/interprete/open.rb +148 -0
  13. data/lib/{plugins/usecases → interprete}/put.rb +19 -6
  14. data/lib/{plugins/usecases → interprete}/safe.rb +2 -1
  15. data/lib/{plugins/usecases/lock.rb → interprete/seal.rb} +24 -34
  16. data/lib/interprete/set.rb +46 -0
  17. data/lib/interprete/use.rb +43 -0
  18. data/lib/interpreter.rb +165 -0
  19. data/lib/keytools/binary.map.rb +245 -0
  20. data/lib/keytools/digester.rb +245 -0
  21. data/lib/keytools/doc.conversion.to.ones.and.zeroes.ruby +179 -0
  22. data/lib/keytools/doc.rsa.radix.binary-mapping.ruby +190 -0
  23. data/lib/keytools/doc.star.schema.strategy.txt +77 -0
  24. data/lib/keytools/doc.using.pbkdf2.kdf.ruby +95 -0
  25. data/lib/keytools/doc.using.pbkdf2.pkcs.ruby +266 -0
  26. data/lib/keytools/kdf.bcrypt.rb +180 -0
  27. data/lib/keytools/kdf.pbkdf2.rb +164 -0
  28. data/lib/keytools/key.data.rb +227 -0
  29. data/lib/keytools/key.derivation.rb +341 -0
  30. data/lib/keytools/key.module.rb +140 -0
  31. data/lib/keytools/key.rb +481 -0
  32. data/lib/logging/gem.logging.rb +1 -2
  33. data/lib/modules/cryptology.md +43 -0
  34. data/lib/{plugins/ciphers → modules/cryptology}/aes-256.rb +6 -0
  35. data/lib/{crypto → modules/cryptology}/amalgam.rb +6 -0
  36. data/lib/modules/cryptology/blowfish.rb +130 -0
  37. data/lib/modules/cryptology/cipher.rb +207 -0
  38. data/lib/modules/cryptology/collect.rb +118 -0
  39. data/lib/{plugins → modules/cryptology}/crypt.io.rb +5 -0
  40. data/lib/{crypto → modules/cryptology}/engineer.rb +7 -1
  41. data/lib/{crypto → modules/cryptology}/open.bcrypt.rb +0 -0
  42. data/lib/modules/mappers/collateral.rb +282 -0
  43. data/lib/modules/mappers/dictionary.rb +288 -0
  44. data/lib/modules/mappers/envelope.rb +127 -0
  45. data/lib/modules/mappers/settings.rb +170 -0
  46. data/lib/modules/storage/coldstore.rb +186 -0
  47. data/lib/{opensecret/plugins.io/git/git.flow.rb → modules/storage/git.store.rb} +11 -0
  48. data/lib/notepad/scratch.pad.rb +17 -0
  49. data/lib/session/fact.finder.rb +13 -0
  50. data/lib/session/require.gem.rb +5 -0
  51. data/lib/store-commands.txt +180 -0
  52. data/lib/version.rb +1 -1
  53. data/opensecret.gemspec +5 -6
  54. metadata +74 -29
  55. data/lib/crypto/blowfish.rb +0 -85
  56. data/lib/crypto/collect.rb +0 -140
  57. data/lib/crypto/verify.rb +0 -33
  58. data/lib/opensecret.rb +0 -236
  59. data/lib/plugins/cipher.rb +0 -203
  60. data/lib/plugins/ciphers/blowfish.rb +0 -126
  61. data/lib/plugins/coldstore.rb +0 -181
  62. data/lib/plugins/envelope.rb +0 -116
  63. data/lib/plugins/secrets.uc.rb +0 -94
  64. data/lib/plugins/usecase.rb +0 -239
  65. data/lib/plugins/usecases/init.rb +0 -145
  66. data/lib/plugins/usecases/open.rb +0 -108
  67. data/lib/session/attributes.rb +0 -279
  68. data/lib/session/dictionary.rb +0 -191
  69. data/lib/session/file.path.rb +0 -53
  70. data/lib/session/session.rb +0 -80
@@ -1,53 +0,0 @@
1
- #!/usr/bin/ruby
2
- # coding: utf-8
3
-
4
- module OpenSession
5
-
6
- require 'inifile'
7
- require 'singleton'
8
-
9
- class FilePath
10
-
11
- # Get the directory that the session context file either does
12
- # or will sit inside.
13
- #
14
- # The directory hangs off the home directory and is named simply
15
- # as the dot prefixed context_name.
16
- #
17
- # @example ~/.openbox is the directory for context "openbox"
18
- #
19
- # @param context_name [String] name of program (or use case) context
20
- # @return [String] path to directory holding context configuration file
21
- def self.context_path context_name
22
-
23
- return File.join home_directory, ".#{context_name}"
24
-
25
- end
26
-
27
-
28
- # On non-windows systems the home directory is defined
29
- # perfectly by Ruby's Dir object.
30
- #
31
- # On Windows we sometimes get /AppData/Roaming appended
32
- # onto the actual home directory. In these cases this
33
- # method removes it.
34
- #
35
- # @return [String] the path to the machine user's home directory
36
- def self.home_directory
37
-
38
- return Dir.home unless Gem.win_platform?
39
-
40
- extraneous_path = "/AppData/Roaming"
41
- if Dir.home.end_with? extraneous_path then
42
- return Dir.home.gsub( extraneous_path, "" )
43
- end
44
-
45
- return Dir.home
46
-
47
- end
48
-
49
-
50
- end
51
-
52
-
53
- end
@@ -1,80 +0,0 @@
1
- #!/usr/bin/ruby
2
- # coding: utf-8
3
-
4
- module OpenSession
5
-
6
- # Data and session attributes that span or have relevance across the
7
- # entire runtime software instantiation.
8
- #
9
- # The sessiondata includes information on the user, the home directory,
10
- # the session-wide reference time stamp and the session context.
11
- class Session
12
- include Singleton
13
-
14
- # The session context is derived from the module name of the caller
15
- # of the {self.set_context} method.
16
- attr_accessor :context
17
-
18
-
19
- # Read the software context by looking at the name of the module
20
- # that is calling this method.
21
- #
22
- # @example
23
- # If the caller is registered as OpenTools::Hammer the session
24
- # context name is opentools
25
- #
26
- # The context name derivation simply pulls out the module name from
27
- # the stack trace and downcases it.
28
- ############ def set_context
29
-
30
- ########### module_name = File.basename caller_locations(1,1).first.absolute_path, ".rb"
31
- ######## @context = module_name.downcase
32
-
33
- ########### end
34
-
35
-
36
- # On non-windows systems the home directory is defined
37
- # perfectly by Ruby's Dir object.
38
- #
39
- # On Windows we sometimes get /AppData/Roaming appended
40
- # onto the actual home directory. In these cases this
41
- # method removes it.
42
- #
43
- # @return [String] the path to the machine user's home directory
44
- def home_directory
45
-
46
- return Dir.home unless Gem.win_platform?
47
-
48
- extraneous_path = "/AppData/Roaming"
49
- if Dir.home.end_with? extraneous_path then
50
- return Dir.home.gsub( extraneous_path, "" )
51
- end
52
-
53
- return Dir.home
54
-
55
- end
56
-
57
-
58
- #
59
- # Get the username of the logged in user. This name should
60
- # not contain spaces (and should be just alphanumeric).
61
- #
62
- # The current implementation uses environment variables and
63
- # crudely states that the username is
64
- #
65
- # - ENV['USERNAME'] for the Windows platform
66
- # - ENV['USER'] for Linux (and everything else)
67
- #
68
- # @return [String] the username of the machine user
69
- def username
70
-
71
- return ENV['USERNAME'] if Gem.win_platform?
72
- return ENV['USER']
73
-
74
- end
75
-
76
-
77
- end
78
-
79
-
80
- end