public RSACryptoServiceProvider getPublicKey() { return(RSAEncryptionUtil.toPublicKey(publicKey)); }
public KeyResponsePacket(AesCryptoServiceProvider secretKey, RSACryptoServiceProvider publicKey) { this.secretKeyEncrypted = RSAEncryptionUtil.encryptKey(secretKey, publicKey).ToList(); }
public InitialHandshakePacket(RSACryptoServiceProvider publicKey, VersionData versionData) { this.publicKey = RSAEncryptionUtil.toBase64(publicKey); this.versionData = new VersionDataString(version: versionData.Version.ToString(), minVersion: versionData.MinVersion.ToString()); }