Stay organized with collections
Save and categorize content based on your preferences.
BadPaddingException
open class BadPaddingException : GeneralSecurityException
Known Direct Subclasses
AEADBadTagException |
This exception is thrown when a Cipher operating in an AEAD mode (such as GCM/CCM) is unable to verify the supplied authentication tag.
|
|
This exception is thrown when a particular padding mechanism is expected for the input data but the data is not padded properly.
Summary
Public constructors |
Constructs a BadPaddingException with no detail message.
|
Constructs a BadPaddingException with the specified detail message.
|
Public constructors
BadPaddingException
BadPaddingException()
Constructs a BadPaddingException with no detail message. A detail message is a String that describes this particular exception.
BadPaddingException
BadPaddingException(msg: String!)
Constructs a BadPaddingException with the specified detail message.
Parameters |
msg |
String!: the detail message. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# BadPaddingException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBadPaddingException\n===================\n\n```\nopen class BadPaddingException : GeneralSecurityException\n```\n\n|---|---|---|---|---------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||\n| | ↳ | [java.lang.Exception](../../java/lang/Exception.html#) |||\n| | | ↳ | [java.security.GeneralSecurityException](../../java/security/GeneralSecurityException.html#) ||\n| | | | ↳ | [javax.crypto.BadPaddingException](#) |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [AEADBadTagException](/reference/kotlin/javax/crypto/AEADBadTagException) |---------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AEADBadTagException](/reference/kotlin/javax/crypto/AEADBadTagException) | This exception is thrown when a [Cipher](/reference/kotlin/javax/crypto/Cipher) operating in an AEAD mode (such as GCM/CCM) is unable to verify the supplied authentication tag. | |\n\nThis exception is thrown when a particular padding mechanism is expected for the input data but the data is not padded properly.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [BadPaddingException](#BadPaddingException())`()` Constructs a BadPaddingException with no detail message. |\n| [BadPaddingException](#BadPaddingException(kotlin.String))`(`msg:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs a BadPaddingException with the specified detail message. |\n\nPublic constructors\n-------------------\n\n### BadPaddingException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBadPaddingException()\n```\n\nConstructs a BadPaddingException with no detail message. A detail message is a String that describes this particular exception. \n\n### BadPaddingException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBadPaddingException(msg: String!)\n```\n\nConstructs a BadPaddingException with the specified detail message.\n\n| Parameters ||\n|-------|--------------------------------------------------------------------------------------------------------|\n| `msg` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message. |"]]