tu.crossing.JavaCryptographicArchitecture.3.1.2.source-code.SecretKeyFactory.crysl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JavaCryptographicArchitecture
Show all versions of JavaCryptographicArchitecture
JavaCryptographicArchitecture CrySL ruleset
The newest version!
SPEC javax.crypto.SecretKeyFactory
OBJECTS
java.lang.String algorithm;
javax.crypto.SecretKey key;
javax.crypto.SecretKey otherKey;
java.security.spec.KeySpec keySpec;
EVENTS
g1: getInstance(algorithm);
g2: getInstance(algorithm, _);
Get := g1 | g2;
gS: key = generateSecret(keySpec);
tK: key = translateKey(otherKey);
Gen := gS | tK;
ORDER
Get, Gen
CONSTRAINTS
algorithm in {"PBKDF2WithHmacSHA512", "PBKDF2WithHmacSHA384", "PBKDF2WithHmacSHA256", "PBKDF2WithHmacSHA224",
"PBEWithHmacSHA512AndAES_128","PBEWithHmacSHA384AndAES_128", "PBEWithHmacSHA384AndAES_128",
"PBEWithHmacSHA224AndAES_128", "PBEWithHmacSHA256AndAES_128","PBEWithHmacSHA224AndAES_256",
"PBEWithHmacSHA256AndAES_256", "PBEWithHmacSHA384AndAES_256", "PBEWithHmacSHA512AndAES_256"};
REQUIRES
speccedKey[keySpec, _];
ENSURES
generatedKey[key, algorithm];