1d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root/* 2d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Copyright 2013 The Android Open Source Project 3d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * 4d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Licensed under the Apache License, Version 2.0 (the "License"); 5d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * you may not use this file except in compliance with the License. 6d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * You may obtain a copy of the License at 7d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * 8d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * http://www.apache.org/licenses/LICENSE-2.0 9d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * 10d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Unless required by applicable law or agreed to in writing, software 11d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * distributed under the License is distributed on an "AS IS" BASIS, 12d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * See the License for the specific language governing permissions and 14d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * limitations under the License. 15d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root */ 16d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root 17d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Rootpackage javax.crypto; 18d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root 19d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root/** 20d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Thrown by a {@link Cipher} that is using an Authenticated Encryption with 21d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Additional Data (AEAD) mode such as Galois/Counter Mode (GCM) and the tag 22d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * failed verification. 23d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * 24d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * @since 1.7 25d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root */ 26d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Rootpublic class AEADBadTagException extends BadPaddingException { 27d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root private static final long serialVersionUID = -488059093241685509L; 28d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root 29d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root /** 30d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Constructs an instance of {@code AEADBadTagException}. 31d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root */ 32d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root public AEADBadTagException() { 33d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root super(); 34d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root } 35d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root 36d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root /** 37d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * Constructs an instance of {@code AEADBadTagException} with the given 38d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root * {@code message}. 39d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root */ 40d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root public AEADBadTagException(String message) { 41d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root super(message); 42d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root } 43d416195acbc08f2b3bdd5d5532d40438465d99e9Kenny Root} 44