public SymmetricKeyEncSessionPacket( BcpgInputStream bcpgIn) { version = bcpgIn.ReadByte(); encAlgorithm = (SymmetricKeyAlgorithmTag)bcpgIn.ReadByte(); s2k = new S2k(bcpgIn); secKeyData = bcpgIn.ReadAll(); }
internal SecretKeyPacket( BcpgInputStream bcpgIn) { if (this is SecretSubkeyPacket) { pubKeyPacket = new PublicSubkeyPacket(bcpgIn); } else { pubKeyPacket = new PublicKeyPacket(bcpgIn); } s2kUsage = bcpgIn.ReadByte(); if (s2kUsage == UsageChecksum || s2kUsage == UsageSha1) { encAlgorithm = (SymmetricKeyAlgorithmTag)bcpgIn.ReadByte(); s2k = new S2k(bcpgIn); } else { encAlgorithm = (SymmetricKeyAlgorithmTag)s2kUsage; } if (!(s2k != null && s2k.Type == S2k.GnuDummyS2K && s2k.ProtectionMode == 0x01)) { if (s2kUsage != 0) { if (((int)encAlgorithm) < 7) { iv = new byte[8]; } else { iv = new byte[16]; } bcpgIn.ReadFully(iv); } } secKeyData = bcpgIn.ReadAll(); }
public UserIdPacket( BcpgInputStream bcpgIn) { this.idData = bcpgIn.ReadAll(); }