mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
drop md5 pattern and add more names for hashes (IJ-CR-103414)
GitOrigin-RevId: 0b74a662fdef33c697559cdadcb82cb62b04e3d1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
56276c7763
commit
d0657697d6
@@ -48,11 +48,10 @@ public class LiteralNameSuggester {
|
||||
new PatternBasedSuggestions("SELECT\\s.*FROM\\s.*", "query", "sql"),
|
||||
new PatternBasedSuggestions("(19|20)[0-9][0-9]([-/])(0?[1-9]|1[0-2])\\2(0?[1-9]|[12][0-9]|30|31)", "date"),
|
||||
new PatternBasedSuggestions("(?:[0-1]?[0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?", "time"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{32}", "md5", "hash"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{40}", "sha1", "hash"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{64}", "sha256", "hash"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{96}|sha384-[A-Za-z0-9+=/]{64}", "sha384", "hash"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{128}|sha512-[A-Za-z0-9+=/]{88}", "sha512", "hash"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{40}", "sha1", "hash", "key", "secret", "token"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{64}", "sha256", "hash", "key", "secret", "token"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{96}|sha384-[A-Za-z0-9+=/]{64}", "sha384", "hash", "key", "secret", "token"),
|
||||
new PatternBasedSuggestions("[0-9a-fA-F]{128}|sha512-[A-Za-z0-9+=/]{88}", "sha512", "hash", "key", "secret", "token"),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,17 +39,16 @@ public class LiteralNameSuggesterTest {
|
||||
{"2012/2/3", "date"},
|
||||
{"23:59", "time"},
|
||||
{"7:00:00", "time"},
|
||||
{"79054025255fb1a26e4bc422adfebeed", "md5", "hash"},
|
||||
{"c3499c2729730aaff07efb8676a92dcb6f8a3f8f", "sha1", "hash"},
|
||||
{"50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c", "sha256", "hash"},
|
||||
{"sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu", "sha384", "hash"},
|
||||
{"fe5ec832d75fd78ec517f33a181259bb953dc54aa8a6332ba0800172c64b18e92b362e0188891efcdb3e3c7d4fb3c14b", "sha384", "hash"},
|
||||
{"sha512-j0Q2QD83DuJB4LcfsSAoUINhA5gmZsrBgwxiYMXYhrRH+kwU09Ht3qKGuf+7WbaWnxDYOI0KiKKZ+HgshPR/fw==", "sha512", "hash"},
|
||||
{"a65a5831694db0d4ef143cfabce59d4a55c19999e308b34f642e93ccb17bd2cd45642e255d9ecc517c5565a874daa0f903b006d5fa905d158cee43adb28254fa", "sha512", "hash"},
|
||||
{"c3499c2729730aaff07efb8676a92dcb6f8a3f8f", "sha1", "hash", "key", "secret", "token"},
|
||||
{"50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c", "sha256", "hash", "key", "secret", "token"},
|
||||
{"sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu", "sha384", "hash", "key", "secret", "token"},
|
||||
{"fe5ec832d75fd78ec517f33a181259bb953dc54aa8a6332ba0800172c64b18e92b362e0188891efcdb3e3c7d4fb3c14b", "sha384", "hash", "key", "secret", "token"},
|
||||
{"sha512-j0Q2QD83DuJB4LcfsSAoUINhA5gmZsrBgwxiYMXYhrRH+kwU09Ht3qKGuf+7WbaWnxDYOI0KiKKZ+HgshPR/fw==", "sha512", "hash", "key", "secret", "token"},
|
||||
{"a65a5831694db0d4ef143cfabce59d4a55c19999e308b34f642e93ccb17bd2cd45642e255d9ecc517c5565a874daa0f903b006d5fa905d158cee43adb28254fa", "sha512", "hash", "key", "secret", "token"},
|
||||
};
|
||||
for (String[] test : data) {
|
||||
List<String> strings = LiteralNameSuggester.literalNames(test[0]);
|
||||
assertEquals(test[0], strings, Arrays.asList(test).subList(1, test.length));
|
||||
assertEquals(test[0], Arrays.asList(test).subList(1, test.length), strings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user