I had a problem. I solved it, but I was worried there might be holes in the solution that I hadn't considered.
So I thought I'd post the question to Stack Overflow, and I saw two choices.
- Post my code and ask "is this ok?", or
- post the original problem as a question, and use self-answer mechanism to post my solution as an answer, to go into the pot with potential other answers, be up/downvoted as normal, perhaps critiqued in comments...
I decided 2 was a better option, as (I felt) it really wasn't a simple yes/no question, but rather a question of how best to solve the original problem.
I got one constructive comment on my answer, then a couple of comments saying I wasn't answering the question (which I believe I was, although I did finish with "Is this secure? Is this overkill?", which may have raised alarm bells).
And then shortly afterwards, my answer was simply deleted. This seemed a bit harsh, and when I read https://stackoverflow.com/help/deleted-answers I'm not really sure which of the reasons were the grounds for deletion - only real candidates were "not attempting to answer the question", which I just flat-out don't accept, and "asking another, different question", which I don't think I agree with either, but makes slightly more sense.
So my question is: was this an appropriate use of the self-answer mechanism, or should I have just posted the "is this ok?" question? If I hadn't questioned the correctness of my own answer but simply posted it as a solution would that have been better? And was it correct for someone to delete the answer in the circumstances?
Full disclosure: there's a further wrinkle. The question probably doesn't belong on Stack Overflow in the first place - it was pointed out that being more about cryptography algorithms, it should instead be on security.stackexchange instead, and I tend to agree.
So, given that and that my answer had been deleted, I decided to delete the question. But if you ignore the off-topic part of the problem, the question above still applies. Deleted question is here https://stackoverflow.com/questions/23809412/cryptographically-secure-end-to-end-over-http - let me know if I should undelete it for reference purposes.