tu.crossing.JavaCryptographicArchitecture.3.1.2.source-code.SecretKeySpec.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.spec.SecretKeySpec
OBJECTS
java.lang.String keyAlgorithm;
byte[] keyMaterial;
int len;
int offset;
EVENTS
c1: SecretKeySpec(keyMaterial, keyAlgorithm);
c2: SecretKeySpec(keyMaterial, offset, len, keyAlgorithm);
Con := c1 | c2;
ORDER
Con
CONSTRAINTS
keyAlgorithm in {"AES", "HmacSHA256", "HmacSHA384", "HmacSHA512"};
length[keyMaterial] >= offset + len;
neverTypeOf[keyMaterial, java.lang.String];
REQUIRES
preparedKeyMaterial[keyMaterial];
ENSURES
speccedKey[this, _];
generatedKey[this, keyAlgorithm];