Package codes.grow.packages.vault
Record Class TransitKey
java.lang.Object
java.lang.Record
codes.grow.packages.vault.TransitKey
- Record Components:
name- key nametype- key type, e.g.aes256-gcm96,ed25519keys- version to creation time (unix seconds as text) or, for asymmetric keys, the JSON of the version entry (withpublic_key)latestVersion- latest versionminDecryptionVersion- minimum version allowed for decryptionminEncryptionVersion- minimum version used for encryption (0 = latest)minAvailableVersion- oldest version still storeddeletionAllowed- whetherdeleteKeyis allowedexportable- whether the key can be exportedderived- whether key derivation is usedsupportsEncryption- encryption supportsupportsDecryption- decryption supportsupportsSigning- signing supportsupportsDerivation- derivation supportautoRotatePeriod- automatic rotation period (zero = off)
public record TransitKey(String name, String type, Map<String,String> keys, int latestVersion, int minDecryptionVersion, int minEncryptionVersion, int minAvailableVersion, boolean deletionAllowed, boolean exportable, boolean derived, boolean supportsEncryption, boolean supportsDecryption, boolean supportsSigning, boolean supportsDerivation, Duration autoRotatePeriod)
extends Record
A transit key (
GET transit/keys/<name>).-
Constructor Summary
ConstructorsConstructorDescriptionTransitKey(String name, String type, Map<String, String> keys, int latestVersion, int minDecryptionVersion, int minEncryptionVersion, int minAvailableVersion, boolean deletionAllowed, boolean exportable, boolean derived, boolean supportsEncryption, boolean supportsDecryption, boolean supportsSigning, boolean supportsDerivation, Duration autoRotatePeriod) Creates the record; the map is copied. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautoRotatePeriodrecord component.booleanReturns the value of thedeletionAllowedrecord component.booleanderived()Returns the value of thederivedrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexportablerecord component.final inthashCode()Returns a hash code value for this object.keys()Returns the value of thekeysrecord component.intReturns the value of thelatestVersionrecord component.intReturns the value of theminAvailableVersionrecord component.intReturns the value of theminDecryptionVersionrecord component.intReturns the value of theminEncryptionVersionrecord component.name()Returns the value of thenamerecord component.booleanReturns the value of thesupportsDecryptionrecord component.booleanReturns the value of thesupportsDerivationrecord component.booleanReturns the value of thesupportsEncryptionrecord component.booleanReturns the value of thesupportsSigningrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
TransitKey
public TransitKey(String name, String type, Map<String, String> keys, int latestVersion, int minDecryptionVersion, int minEncryptionVersion, int minAvailableVersion, boolean deletionAllowed, boolean exportable, boolean derived, boolean supportsEncryption, boolean supportsDecryption, boolean supportsSigning, boolean supportsDerivation, Duration autoRotatePeriod) Creates the record; the map is copied.- Parameters:
name- nametype- typekeys- keyslatestVersion- latest versionminDecryptionVersion- min decryption versionminEncryptionVersion- min encryption versionminAvailableVersion- min available versiondeletionAllowed- deletion flagexportable- export flagderived- derived flagsupportsEncryption- encryption flagsupportsDecryption- decryption flagsupportsSigning- signing flagsupportsDerivation- derivation flagautoRotatePeriod- rotation period
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
keys
Returns the value of thekeysrecord component.- Returns:
- the value of the
keysrecord component
-
latestVersion
public int latestVersion()Returns the value of thelatestVersionrecord component.- Returns:
- the value of the
latestVersionrecord component
-
minDecryptionVersion
public int minDecryptionVersion()Returns the value of theminDecryptionVersionrecord component.- Returns:
- the value of the
minDecryptionVersionrecord component
-
minEncryptionVersion
public int minEncryptionVersion()Returns the value of theminEncryptionVersionrecord component.- Returns:
- the value of the
minEncryptionVersionrecord component
-
minAvailableVersion
public int minAvailableVersion()Returns the value of theminAvailableVersionrecord component.- Returns:
- the value of the
minAvailableVersionrecord component
-
deletionAllowed
public boolean deletionAllowed()Returns the value of thedeletionAllowedrecord component.- Returns:
- the value of the
deletionAllowedrecord component
-
exportable
public boolean exportable()Returns the value of theexportablerecord component.- Returns:
- the value of the
exportablerecord component
-
derived
public boolean derived()Returns the value of thederivedrecord component.- Returns:
- the value of the
derivedrecord component
-
supportsEncryption
public boolean supportsEncryption()Returns the value of thesupportsEncryptionrecord component.- Returns:
- the value of the
supportsEncryptionrecord component
-
supportsDecryption
public boolean supportsDecryption()Returns the value of thesupportsDecryptionrecord component.- Returns:
- the value of the
supportsDecryptionrecord component
-
supportsSigning
public boolean supportsSigning()Returns the value of thesupportsSigningrecord component.- Returns:
- the value of the
supportsSigningrecord component
-
supportsDerivation
public boolean supportsDerivation()Returns the value of thesupportsDerivationrecord component.- Returns:
- the value of the
supportsDerivationrecord component
-
autoRotatePeriod
Returns the value of theautoRotatePeriodrecord component.- Returns:
- the value of the
autoRotatePeriodrecord component
-