漫画、作曲、ラップ、プログラミングをやっています。I am Keita Roimo: Manga Artist, Musician, Rapper, Software Engineer.
Saturday, July 29, 2017
Friday, July 28, 2017
GPG explanation and how to use Ruby GPGME
I made a Ruby::GPGME example implementation code:
https://github.com/keitaroemotion/gpgme_sample
GPG workflow is very simple.
The one who decript the document has to generate the key pair first. So:
1. decryptor generate the gpg key pair. ($gpg --gen-key)
2. decryptor send the public key (1.) to the encryptor.
3. encryptor encrypt the document with the public key(2.) and send that encrypted document(cipher) to decryptor.
4. decryptor decrypt the cipher (3.) with the private key he generated earlier (1.)
Yet this does not include the sign ( I recognize it as sort of additional salt value), and sign part is a little bit not easy for me yet it take both private and public keys.
Im so sleepy so now i have to go to bed
https://github.com/keitaroemotion/gpgme_sample
GPG workflow is very simple.
The one who decript the document has to generate the key pair first. So:
1. decryptor generate the gpg key pair. ($gpg --gen-key)
2. decryptor send the public key (1.) to the encryptor.
3. encryptor encrypt the document with the public key(2.) and send that encrypted document(cipher) to decryptor.
4. decryptor decrypt the cipher (3.) with the private key he generated earlier (1.)
Yet this does not include the sign ( I recognize it as sort of additional salt value), and sign part is a little bit not easy for me yet it take both private and public keys.
Im so sleepy so now i have to go to bed
just a hunch on anime stuff
The anime Toradora is prominent in its depiction of the adult in general. In Toradora, mindset of any adult is immature. Their viewpoint and worldview is as well as their kids, and being depicted as childish. Ryuji Takasu's mother, a single mother who working as night club employee relies on her son.
In this anime series adult in general is regarded as an untrustworthy, immature existence. I analyse it as this series are aiming at the independence of teenagers.
This worldview is totally common in the manga | anime after 90's, the old-school family scheme has gone out of the story settings, which seems interesting since the subculture before that time are largely restricted and limited by the rule or social scheme that what **** should be like.
Minamike is the same one.
Often in Japan a lot of books trying to analyse the manga culture and its history in context of history or sociology often turns out to be nonsense arbitrary piece of bogus since they too much focus on each instance. (That is the weakness of Otaku mind-set analysis).
What we have to focus on here is that the culture itself is embedded in or part of the "capitalism" or "democracy", which means there are no central agency to force any criteria or religious | political ideological creed to overwrite each individual's personal consciousness into something specific.
So manga | anime is a tool | database to measure the social background and ecosystem ....
Im sleepy. I go to bed now....
Tuesday, July 25, 2017
Monday, July 24, 2017
GPGME:: How to supress the interactive popup (passphrase)
I spent days to overcome this issue, when I use GPGME each time the interactive popup came up, which is not desirable for my own project. Here is the solution.
Since the GPGME::Ctx requires you the optional parameter (passwpord | passphrase_callback) you need to pass those hash keypairs as arguments:
...
@context = GPGME::Ctx.new(
pinentry_mode: GPGME::PINENTRY_MODE_LOOPBACK,
passphrase_callback: method(:passfunc)
)
end
def passfunc(obj, uid_hint, passphrase_info, prev_was_bad, fd)
io = IO.for_fd(fd, "w")
io.puts "your passphrase"
io.flush
end
Then without the complicated gpg-agent settings, you can supress the popup. I think looking at the source code is the best way to handle this since it is obvious that there the codes requires the function as argument.
You can refer to the following link for the further information:
https://stackoverflow.com/questions/21554292/gpgme-passphrase-prompt-issue-ruby
http://www.rubydoc.info/github/ueno/ruby-gpgme/GPGME/Ctx
Since the GPGME::Ctx requires you the optional parameter (passwpord | passphrase_callback) you need to pass those hash keypairs as arguments:
...
@context = GPGME::Ctx.new(
pinentry_mode: GPGME::PINENTRY_MODE_LOOPBACK,
passphrase_callback: method(:passfunc)
)
end
def passfunc(obj, uid_hint, passphrase_info, prev_was_bad, fd)
io = IO.for_fd(fd, "w")
io.puts "your passphrase"
io.flush
end
Then without the complicated gpg-agent settings, you can supress the popup. I think looking at the source code is the best way to handle this since it is obvious that there the codes requires the function as argument.
You can refer to the following link for the further information:
https://stackoverflow.com/questions/21554292/gpgme-passphrase-prompt-issue-ruby
http://www.rubydoc.info/github/ueno/ruby-gpgme/GPGME/Ctx
Saturday, July 22, 2017
Saturday, July 8, 2017
Friday, July 7, 2017
Tuesday, July 4, 2017
Monday, July 3, 2017
Sunday, July 2, 2017
Saturday, July 1, 2017
Subscribe to:
Posts (Atom)