简体   繁体   English

在MySQL-DB中存储私钥和公​​钥

[英]Storage of private and public key in MySQL-DB

Probably somebody asked that already, but I couldn't find any usefull information and I've never done it before. 可能有人已经问过了,但我找不到任何有用的信息,我以前从未这样做过。

So here is the problem. 所以这就是问题所在。

If I'll get a set of key pairs (DSA public and private keys) with different time validity and unique ID, what is the best way to store them in MySQL-DB using Java? 如果我得到一组具有不同时间有效性和唯一ID的密钥对(DSA公钥和私钥),那么使用Java将它们存储在MySQL-DB中的最佳方法是什么?

Is it a good idea at all to store them in DB? 将它们存储在DB中是一个好主意吗?

Thank you in advance. 先感谢您。

Mur 穆尔

Ps. PS。 another problem, i cann't really imagine, how do the both keys look like? 另一个问题,我无法想象,这两个键怎么样? just byte arrays? 只是字节数组?

Your best bet is to use blobs when storing them. 最好的办法是在存储时使用blob。

The decision of whether or not it's a good idea to store the keys in the database depends on the specifics of your application. 是否将密钥存储在数据库中是一个好主意的决定取决于您的应用程序的具体情况。 I can imagine a secure database dedicated to storing this type of information might work for some situations. 我可以想象一个专门用于存储此类信息的安全数据库可能适用于某些情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM