mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-22 11:48:17 +00:00
16 lines
291 B
Ruby
16 lines
291 B
Ruby
#!/usr/bin/ruby
|
|
require 'base64'
|
|
require_relative '../../../../../lib/objects/local_string_encoder.rb'
|
|
class BinaryEncoder < StringEncoder
|
|
def initialize
|
|
super
|
|
self.module_name = 'Binary Encoder'
|
|
end
|
|
|
|
def encode(str)
|
|
str.unpack('B*').first
|
|
end
|
|
end
|
|
|
|
BinaryEncoder.new.run
|