将很大的数字存储在C中的整数中 [英] Store very big numbers in an integer in C

查看:37
本文介绍了将很大的数字存储在C中的整数中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在C程序中以整数形式存储一个非常大的数字, unsigned long int 仍然太小,我需要一个非常大的数据类型,该类型仍然可以与模运算符一起使用(%).

I need to store a very large number as an integer in a C program, unsigned long int is still too small, I need a very large data type that will still work with the modulo operator (%).

推荐答案

有几个库可以做到这一点

There are several libraries that can do this

如果您出于加密目的需要它(例如,模数算法的需求提示了RSA),则OpenSSL BN非常适合

If you need it for cryptographic purposes (e.g. RSA as hinted by your need of modulo arithmetic), OpenSSL BN is ideally suited

这篇关于将很大的数字存储在C中的整数中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆