public static KeyStore <Pbkdf2Params> MapDTOToModel(KeyStorePbkdf2DTO dto) { var pbdk2KeyStore = new KeyStore <Pbkdf2Params>(); pbdk2KeyStore.Address = dto.address; pbdk2KeyStore.Id = dto.id; pbdk2KeyStore.Version = dto.version; pbdk2KeyStore.Crypto = new CryptoInfo <Pbkdf2Params>(); pbdk2KeyStore.Crypto.Cipher = dto.crypto.cipher; pbdk2KeyStore.Crypto.CipherText = dto.crypto.cipherText; pbdk2KeyStore.Crypto.Kdf = dto.crypto.kdf; pbdk2KeyStore.Crypto.Mac = dto.crypto.mac; pbdk2KeyStore.Crypto.Kdfparams = new Pbkdf2Params(); pbdk2KeyStore.Crypto.Kdfparams.Count = dto.crypto.kdfparams.c; pbdk2KeyStore.Crypto.Kdfparams.Prf = dto.crypto.kdfparams.prf; pbdk2KeyStore.Crypto.Kdfparams.Dklen = dto.crypto.kdfparams.dklen; pbdk2KeyStore.Crypto.Kdfparams.Salt = dto.crypto.kdfparams.salt; pbdk2KeyStore.Crypto.CipherParams = new CipherParams(); pbdk2KeyStore.Crypto.CipherParams.Iv = dto.crypto.cipherparams.iv; return(pbdk2KeyStore); }