#!/usr/bin/ruby

require 'base64'


encoded = Base64.encode64('Hello, World!') # "SGVsbG8sIFdvcmxkIQ==\n" 각 60문자마다, 그리고 맨 뒤에 줄바꿈 문자가 추가됩니다.
decodeed = Base64.decode64(encoded)

encoded = Base64.urlsafe_encode64('Hello, World!') # "SGVsbG8sIFdvcmxkIQ=="
decodeed = Base64.urlsafe_decode64(encoded)

encoded = Base64.strict_encode64('Hello, World!') # "SGVsbG8sIFdvcmxkIQ==" 줄바꿈이 추가되지 않습니다.
decodeed = Base64.strict_decode64(encoded)

p encoded
p decodeed



END{
  # https://ruby-doc.org/3.3.0/stdlibs/base64/Base64.html
}
