- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
try {
keySpec = new PBEKeySpec(s.toCharArray());
tempKey = SecretKeyFactory.getInstance(ALGORITHM).generateSecret(keySpec);
} catch (InvalidKeySpecException i) {}
if(tempKey == null) {
keySpec = new PBEKeySpec(s.toCharArray());
tempKey = SecretKeyFactory.getInstance(ALGORITHM).generateSecret(keySpec);
}