PDF
1KDBX4 Contents ....................................................................................... 1Encrypted) ................................................................................ 4便便使 20x9AA2D903 0xB54BFB670x0004000002100000 0031C1F2 E6BF7143 50BE5805 216AFC5A FFEndOfHeader = 0,Comment = 1,CipherID = 2,CompressionFlags = 3,MasterSeed = 4,TransformSeed = 5,TransformRounds = 6,EncryptionIV = 7,ProtectedStreamKey = 8,StreamStartBytes = 9,InnerRandomStreamID = 10,KdfParameters = 11,PublicCustomData = 120x31c1f2e6bf714350be5805216afc5aff0xad68f29f576f4bb9a36ad47af965346c0xD6038A2B8B6F4CB5A524339A31DBB59A 3使Key transform使#include "argon2.h"#include <stdio.h>#include <stdlib.h>int main(int argc, char*argv[]){ uint8_t pwd[32] = {0xbf, 0xa1, 0x1b, 0x4e, 0x43, 0x76, 0xcf, 0x1b, 0x17, 0x08, 0x8a, 0x3d, 0xe3, 0x75, 0xf1, 0xdf, 0x6a, 0x9c, 0x4c, 0xb3, 0xeb, 0x36, 0xf3, 0xce, 0x24, 0x16, 0xb1, 0x04, 0x81, 0xeb, 0x61, 0x9f}; uint8_t salt[32] = {0x3f, 0x09, 0xea, 0x13, 0xce, 0xff, 0xb8, 0xe8, 0x67, 0xa4, 0xaf, 0x3a, 0xb1, 0x78, 0x54, 0xf9, 0xf5, 0xf1, 0x52, 0x59, 0x16, 0x53, 0xc7, 0x37, 0xa8, 0x96, 0x2b, 0x94, 0x35, 0x6e, 0x2c, 0x0f}; uint8_t result[32]; Encrypted)4 // argon2: seed=kef.seed, version=19, rounds=2, memory=1024, parallelism=2 argon2_hash(2, 1024, 2, pwd, 32, salt, 32, result, 32, nullptr, 0, Argon2_d, 19); for(int i = 0; i < 32; i ++) printf("%02x", result[i]);}Hmacsha512(17e4aa736440b2c6f963184b9baf07a3c2b7ac652a95d4b375baf938cd5dbe4b104e9ba7b6b4479eec1a8fe3f9ca285fd10e0f33435fcabd8edf3e16380a98c701)= 9340685dcea0fbee49a68417708cbffb24958fc6fb20de6cb158196b6291f0719f46669bbc8f7254bcbc0da0650d795fe9c782e443d3f32b7a957f73c8f58128sha512(ffffffffffffffff9340685dcea0fbee49a68417708cbffb24958fc6fb20de6cb158196b6291f0719f46669bbc8f7254bcbc0da0650d795fe9c782e443d3f32b7a957f73c8f58128)=1062ee78cf505ac4af4e53f343b04782178a3c6d6b8e64ecb23ca6ce9489ab30660b92cf1f88dbf0333769e9f362ae2d7dff82554d864a4c2d1d3b751b5698f7Hmac-sha256(03D9A29A67FB4BB500000400021000000031C1F2E6BF714350BE5805216AFC5AFF030400000000000000042000000017E4AA736440B2C6F963184B9BAF07A3C2B7AC652A95D4B375BAF938CD5DBE4B0B8B00000000014205000000245555494410000000EF636DDF8C29444B91F7A9A403E30A0C040100000056040000001300000005010000004908000000020000000000000005010000004D0800000000001000000000000401000000500400000002000000420100000053200000003F09EA13CEFFB8E867A4AF3AB17854F9F5F152591653C737A8962B94356E2C0F000710000000C1F6FD873E14050697C168B3E9DA5DB200040000000D0A0D0A, 1062ee78cf505ac4af4e53f343b04782178a3c6d6b8e64ecb23ca6ce9489ab30660b92cf1f88dbf0333769e9f362ae2d7dff82554d864a4c2d1d3b751b5698f7)=376123254b1aef5db7cb13e73807fc74341b8baa7e182a50f4cfdf14d5fdd532Encrypted)sha256(17E4AA736440B2C6F963184B9BAF07A3C2B7AC652A95D4B375BAF938CD5DBE4B104e9ba7b6b4479eec1a8fe3f9ca285fd10e0f33435fcabd8edf3e16380a98c7)=dce60234d641f71f377ecafb5a566ce954d26c03fd3b5b23e9ed092ef42b5290Key=dce60234d641f71f377ecafb5a566ce954d26c03fd3b5b23e9ed092ef42b5290Iv=c1f6fd873e14050697c168b3e9da5db29a0106470245744f9121bbafa5dd10df => 01040000000300000002400000008B2E使 Encrypted)5public static byte[] decrypt(byte[] key, byte[] initVector, byte[] encrypted) { try { IvParameterSpec iv = new IvParameterSpec(initVector); SecretKeySpec skeySpec = new SecretKeySpec(key, "AES"); Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv); return cipher.doFinal(encrypted); } catch (Exception ex) { ex.printStackTrace(); } return null; }Inner Header0x00: End of header.0x01: Inner random stream ID (this supersedes the inner random stream ID stored in the outer header of a KDBX 3.1 file).0x02: Inner random stream key (this supersedes the inner random stream key stored in the outer header of a KDBX 3.1 file).0x03: Binary (entry attachment). D = F M, where F is one byte and M is the binary content (i.e. the actual entry attachment data). F stores flags for the binary; supported flags are: 0x01: The user has turned on process memory protection for this binary.XML Database Encrypted)6

HTML view coming soon.

Download PDF for the full formatted version.