You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
varkeyList=RsaKeyGenerator.Pkcs1Key(2048,false);
......
var bigDataRsa =newRsaPkcs1Util(Encoding.UTF8,PUBLIC_KEY,PRIVATE_LEY,2048);var text=bigDataRsa.EncryptBigData("12312312312",RSAEncryptionPadding.Pkcs1);
......
var bigDataRsa =newRsaPkcs1Util(Encoding.UTF8,PUBLIC_KEY,PRIVATE_LEY,2048);var result=string.Join("",bigDataRsa.DecryptBigData(data,RSAEncryptionPadding.Pkcs1));
......
public const string PUBLIC_KEY ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA85hHtD6EsFDETuyWcNd/TPBh5ljTO831aagxC0eKSVokCJlh5Y0CIdXd7iI4pRnCO9sej2ZL4p3wKgQqRF0dAWu8wUuxcXyqlNsdSAl25JLHaRpaE/hwDO3weSiLPao8eTjqepV2q0eJX6nJ5QU6L5E9W7vUDMQ1nlEVbclKJl3SSNTuFGVqyk8RtjG35vJkmeV1P5TL3yOMxbGmJnEqfR/dVo/ikv7sTYWvVLOzPStkTYroYPZnLKjV6r55UuKDgxVPKx5MoJB7EzSIkKqbfic1f5vscNFASWo2tW2adUvUA89wWs2YRzY5bZHmA9Ufdl8tRxAK+gb5YYGSTYkTdwIDAQAB";
public const string PRIVATE_LEY ="MIIEowIBAAKCAQEA85hHtD6EsFDETuyWcNd/TPBh5ljTO831aagxC0eKSVokCJlh5Y0CIdXd7iI4pRnCO9sej2ZL4p3wKgQqRF0dAWu8wUuxcXyqlNsdSAl25JLHaRpaE/hwDO3weSiLPao8eTjqepV2q0eJX6nJ5QU6L5E9W7vUDMQ1nlEVbclKJl3SSNTuFGVqyk8RtjG35vJkmeV1P5TL3yOMxbGmJnEqfR/dVo/ikv7sTYWvVLOzPStkTYroYPZnLKj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ixz/YURqf+SCtUg9FzWsESCMiWzV3vg9Fjw1eH8yzHhZSSJGptESrjDkY4Je3xiu7VaD8TttpvhAoGBAOJ/mxzyIfQuBNSFmrjLiCWdtwElEqwf2K/iimmIr04i5bGjMcMDejNlBUoSWTUmS+3HcIuUz8XetqzvCbRnG4Ozv/edrVA/oYYAQSKmjjo1DWqTBm0zWt59C5U12ZhTwsgVCjMrqiL5z5SlhR//0dQE7NPqTR8HgwSJrQZYmj3m";
Error: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
my encryption result
why i must input privatekey when decrypt. in fact , your code privatekey default value is null.
thank you.
The text was updated successfully, but these errors were encountered: