Add NephriteCrypt (tested game: https://vndb.org/v15822 )

This commit is contained in:
2026-04-09 11:47:13 +08:00
parent 720cdee1de
commit 7ef5d030ac
2 changed files with 57 additions and 0 deletions

View File

@@ -412,6 +412,10 @@
"$type": "HashCrypt",
"Title": "不可視な愛情~透明なボクに感じるママ~"
},
"Gakuen Butou no Folklore": {
"$type": "NephriteCrypt",
"Title": "学園舞闘のフォークロア"
},
"Gakuen Tokkyuu Hotokenser": {
"$type": "CxEncryption",
"Mask": 330,
@@ -430,6 +434,10 @@
"$type": "HashCrypt",
"Title": "義祖母、調教中。 ~仲良しの秘訣はSMです。~"
},
"Gokkun! Onii-chan Milk": {
"$type": "NephriteCrypt",
"Title": "ごっくん!おにーちゃんみるく♪~ぷにぷにおっぱいな妹と~"
},
"Grisaia: Phantom Trigger [Steam]": {
"$type": "CxEncryption",
"Mask": 389,
@@ -532,6 +540,10 @@
"ControlBlockName": "haruiro.bin",
"Title": "春色☆こみゅにけ~しょん♪"
},
"Hatarakanai Honey Life": {
"$type": "NephriteCrypt",
"Title": "ハタラカナイはにーらいふ"
},
"Hataraku Otaku no Ren'ai Jijou": {
"$type": "CxEncryption",
"Mask": 503,
@@ -695,6 +707,10 @@
"$type": "HashCrypt",
"Title": "家出娘種付け姦誘~気弱なあの子を肉便器開発~"
},
"Iinkai no Antihero": {
"$type": "NephriteCrypt",
"Title": "委員界の異端者 ~IINCHO-Re.co~"
},
"Ijou Seiai": {
"$type": "HashCrypt",
"Title": "異常性愛-妄想ビッチと真正ビッチ-"
@@ -1235,10 +1251,18 @@
"ControlBlockName": "nidaime.bin",
"Title": "二代目は☆魔法少女"
},
"Niina-chan Lovely Life": {
"$type": "NephriteCrypt",
"Title": "にいなちゃん Lovely Life"
},
"Nyotai-ka Panic!": {
"$type": "HashCrypt",
"Title": "女体化パニック! ~オンナのコのカラダってキモチイイ~"
},
"Ochiteiku Wakazuma Maiko": {
"$type": "NephriteCrypt",
"Title": "堕ちていく若妻麻衣子"
},
"Ochiteyuku Seishoku Shukujo": {
"$type": "HashCrypt",
"Title": "堕ちてゆく聖職淑女~いけない、夫に無理矢理やらされていただけなのに感じちゃう~"
@@ -1411,6 +1435,10 @@
"$type": "FlyingShineCrypt",
"Title": "プリンセスサーガ"
},
"Rakugaki Overheart": {
"$type": "NephriteCrypt",
"Title": "らくがきオーバーハート"
},
"Re:": {
"$type": "FlyingShineCrypt"
},
@@ -1434,6 +1462,10 @@
"TpmFileName": "plugin/relations.tpm",
"Title": "リレーションズ シスター×シスター | リレーションズ シスター・シスター"
},
"RGH ~Koi to Hero to Gakuen to~": {
"$type": "NephriteCrypt",
"Title": "RGH~恋とヒーローと学園と~"
},
"Riajuu Saimin": {
"$type": "CxEncryption",
"Mask": 518,
@@ -1572,6 +1604,10 @@
"$type": "HashCrypt",
"Title": "清楚なあの娘は、隠れビッチ ~いつでもどこでも欲情SEX~"
},
"Se-n-pa-i ~Hiromi-senpai": {
"$type": "NephriteCrypt",
"Title": "セ・ン・パ・イ〜広海センパイとのラブエロ部活"
},
"Senden no Shugo Kishi Niina": {
"$type": "HashCrypt",
"Title": "閃電の守護騎士ニィナ"

View File

@@ -162,6 +162,7 @@ enum CryptType {
OkibaCrypt,
DieselmineCrypt,
DameganeCrypt,
NephriteCrypt,
}
#[derive(Clone, Debug, Deserialize)]
@@ -251,6 +252,7 @@ impl Schema {
CryptType::OkibaCrypt => Box::new(OkibaCrypt::new(self.base.clone())),
CryptType::DieselmineCrypt => Box::new(DieselmineCrypt::new(self.base.clone())),
CryptType::DameganeCrypt => Box::new(DameganeCrypt::new(self.base.clone())),
CryptType::NephriteCrypt => Box::new(NephriteCrypt::new(self.base.clone())),
})
}
}
@@ -857,6 +859,25 @@ impl<R: Read> Read for DameganeCryptReader<R> {
}
}
seek_crypt_filehash_key_u8_impl!(NephriteCrypt, NephriteCryptReader<T>);
impl<R: Read> Read for NephriteCryptReader<R> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
let readed = self.inner.read(buf)?;
for (i, t) in (&mut buf[..readed]).iter_mut().enumerate() {
let offset = self.seg_start + self.pos + i as u64;
let key = if offset & 1 == 0 {
self.key
} else {
offset as u8
};
*t ^= key;
}
self.pos += readed as u64;
Ok(readed)
}
}
#[test]
fn test_deserialize_crypt() {
for (key, schema) in CRYPT_SCHEMA.iter() {