MCPcopy Create free account
hub / github.com/TigerVNC/tigervnc / checkCipher

Method checkCipher

java/com/jcraft/jsch/Session.java:2482–2494  ·  view source on GitHub ↗
(String cipher)

Source from the content-addressed store, hash-verified

2480 }
2481
2482 static boolean checkCipher(String cipher){
2483 try{
2484 Class c=Class.forName(cipher);
2485 Cipher _c=(Cipher)(c.newInstance());
2486 _c.init(Cipher.ENCRYPT_MODE,
2487 new byte[_c.getBlockSize()],
2488 new byte[_c.getIVSize()]);
2489 return true;
2490 }
2491 catch(Exception e){
2492 return false;
2493 }
2494 }
2495
2496 private String[] checkKexes(String kexes){
2497 if(kexes==null || kexes.length()==0)

Callers 3

checkCiphersMethod · 0.95
loadMethod · 0.95
loadPPKMethod · 0.95

Calls 4

initMethod · 0.95
getBlockSizeMethod · 0.95
getIVSizeMethod · 0.95
newInstanceMethod · 0.80

Tested by

no test coverage detected