有没有一个java解析器可以模拟mysql服务器解析器?(Is there a java parser can simulate mysql server parser?)
我为mysql编写了一个数据库mid-ware。 我需要确定一个sql语句isRead语句或isWrite语句并提取架构和表信息。 我通过谷歌找到的一些解析器只解析DML语句。 但是我需要一个解析器可以解析mysql服务器可以做什么的所有语句。
你认为这是一个好主意我直接在java中调用mysql解析器还是可能的?
I write a database mid-ware for mysql. I need to determine a sql statement isRead statement or isWrite statement and extract the schema and tables information. Some parser I found through google only parse the DML statement. But I need a parser can parse all statement what mysql server can do.
Do you think that is a good idea I call the mysql parser directly in java or is that possible?
原文:https://stackoverflow.com/questions/13329040
更新时间:2022-05-28 12:05
最满意答案
相关问答
更多-
Nodejs bcrypt库(Nodejs bcrypt library)[2023-04-07]
是的,这就是它的全部! 最初加密密码时生成的盐用于防止彩虹表攻击; 你不需要坚持它。 Yes, this is all there is to it! The salt you generate when encrypting the password originally is used to prevent against rainbow table attacks; you do not need to persist it. -
bcrypt生成的散列将是60个字符。 尝试增加列的大小。 哈希信息 包含结果散列的字符是./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$。 结果哈希将是60个字符长。 https://github.com/kelektiv/node.bcrypt.js#hash-info The hash that bcrypt generates will be of 60 character. Try increasing the si ...
-
盐被并入哈希(作为明文)。 比较函数只是把盐从盐中拉出来,然后使用它来哈希密码并进行比较。 The salt is incorporated into the hash (as plaintext). The compare function simply pulls the salt out of the hash and then uses it to hash the password and perform the comparison.
-
在这里找到答案: 计算器-问题 对不起我的帖子。 迎接,黑屏 found the answer here: stackoverflow-question sorry for my post. greets, blackscreen
-
你不应该期望它们匹配,至少在默认情况下是这样。 这是因为对于这两个函数,每次散列值时都会选择随机盐。 重要的不是哈希输出匹配,而是它们仍然有效。 因此,您可以从node.js获取散列输出,并将其与PHP中的password_verify()一起使用,它应该验证。 You shouldn't expect them to match, at least by default. This is because for both functions, a random salt is chosen every t ...
-
你可以跳过做bcrypt.genSalt并使用bcrypt.hash(password, 10, function(err, hash) {..}); 你的比较功能对我来说似乎不错。 这对我来说工作得很好: var bcrypt = require('bcrypt'); bcrypt.hash('mypassword', 10, function(err, hash) { if (err) { throw (err); } bcrypt.compare('mypassword', has ...
-
仔细看看你正在处理的值。 生成的随机盐将会是: abcdefg... 喂入crypt如下所示: crypt($password, '$2y$10$abcdefg...') | | | | | +- the salt | +- the cost parameter +- the algorithm type 结果如下所示: $2y$10$ ...
-
salt不是秘密,它通常使用散列存储在数据库中,并且可以直接存储在散列中,例如password_hash 。 salt创建了独特性,因此散列不会像彩虹表或字典那样容易被破解,除了使散列更加独特以外,它并不真正增加安全性,因此对散列运行字典或表不匹配,因为它还包括盐。 如果你省略了salt,每次密码散列都会通过password_hash()生成一个随机salt。 这是预定的操作模式,您不应该提供自己的盐。 PHP7实际上会产生一个警告,告诉您使用salt选项已被弃用。 传递的盐至少需要22个字符,但大多数底层 ...
-
使用bcrypt-ruby使用版本$ 2y验证散列密码(Using bcrypt-ruby to validate hashed passwords using version $2y)[2022-01-23]
是的,bcrypt-ruby可以处理用2y散列的密码。 你只需要用2a代替2y : irb(main):002:0> BCrypt::Password.new("$2a$10$jD.PlMQwFSYSdu4imy8oCOdqKFq/FDlW./x9cMxoUmcLgdvKCDNd6") == "password" => true 这是必要的,因为bcrypt-ruby似乎遵循Solar Designer的第一个建议,即向后兼容的“符号扩展错误”支持只引入2x 。 [...]我正在考虑继续支持另一个前缀下的 ... -
这是因为有些shell将哈希中的$解释为引用变量的特殊字符。 要解决此问题,请使用引号括起哈希值: bash-3.2$ node createHash.js bacon $2a$10$i.RiIPW5wSSooTHJI6Sl6usKdx94uAmSUZ8489.os9OKLWGcuO6tm bash-3.2$ node checkPassword.js $2a$10$i.RiIPW5wSSooTHJI6Sl6usKdx94uAmSUZ8489.os9OKLWGcuO6tm bacon false bash- ...