org.bouncycastle.tls.KeyUpdateRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bctls-fips Show documentation
Show all versions of bctls-fips Show documentation
The Bouncy Castle Java APIs for the TLS, including a JSSE provider. The APIs are designed primarily to be used in conjunction with the BC FIPS provider. The APIs may also be used with other providers although if being used in a FIPS context it is the responsibility of the user to ensure that any other providers used are FIPS certified and used appropriately.
package org.bouncycastle.tls;
/**
* RFC 8446 4.6.3
*/
public class KeyUpdateRequest
{
public static final short update_not_requested = 0;
public static final short update_requested = 1;
public static String getName(short keyUpdateRequest)
{
switch (keyUpdateRequest)
{
case update_not_requested:
return "update_not_requested";
case update_requested:
return "update_requested";
default:
return "UNKNOWN";
}
}
public static String getText(short keyUpdateRequest)
{
return getName(keyUpdateRequest) + "(" + keyUpdateRequest + ")";
}
public static boolean isValid(short keyUpdateRequest)
{
return keyUpdateRequest >= update_not_requested && keyUpdateRequest <= update_requested;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy