/// <summary> /// Encrypt data by private key. /// </summary> /// <param name="dataBytes">Need to encrypt data</param> /// <returns></returns> public byte[] EncryptByPrivateKey(byte[] dataBytes) { if (PrivateRsa is null) { throw new ArgumentException("private key can not null"); } return(PrivateRsa.EncryptValue(dataBytes)); }