Never though I'm going to dive so deep in this Win32 rabbit hole.

I was originally thinking just wrote a simple wrapper of win32's tape API, but then I realized that the encryption is missing. With Win32's tape api, you can basically implement something like `/dev/st0` (simple read and write) amd `mt` command (rewind, seek, set compression, etc.). I was thinking just use LTOEnc for encryption control.

But that software can only read the encryption key from a file, which, to me, is a big security hole: I can do that in memory, why write to the disk temporarily?

So I start reading LTOEnc's code. I found Microsoft really don't want you to directly talk to SCSI. I read their documents, they never said about IOCTL_SCSI_PASS_THROUGH_DIRECT. They are recommending something like IOCTL_CDROM or something that is not so lower level.

Anyway, thanks to LTOEnc, and Oracle's helpdesk generously providing HPE product's tech ref manual, I now can implement the encryption control in my win32 lib. And soon I can do that in Java.

Follow

Can't imagine now I'm writing C++ and using windows api. I almost reject everything that cannot run on JVM.

Yesterday I thought I'm going to give up during configure the project or compile with MSVC. But appallingly, I get it working and go those far.

Life is full of surprise.

Several days ago I was suffering from jextract and the new project Panama things. Since it's new, there is not much useful documentation and can't get it work in a frustrating day. I was thinking maybe I'm not good at java stuff and should quit and become a Uber eat delivery guy or something. (I blame HR for those negative thoughts)

After several days of suffering and trying, I kind of know how it works and now I'm even writing win32 library in C++. I
m amazing :ablobblewobble:

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.