• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 
28 package javax.crypto;
29 
30 import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
31 
32 import android.annotation.SystemApi;
33 
34 import java.util.*;
35 import java.util.regex.*;
36 import java.security.*;
37 import javax.crypto.spec.*;
38 import sun.security.jca.*;
39 import java.nio.ReadOnlyBufferException;
40 import java.nio.ByteBuffer;
41 import java.security.spec.AlgorithmParameterSpec;
42 import java.security.Provider.Service;
43 
44 @SuppressWarnings({"unchecked", "deprecation", "all"})
45 public class Cipher {
46 
Cipher(javax.crypto.CipherSpi cipherSpi, java.security.Provider provider, java.lang.String transformation)47 protected Cipher(javax.crypto.CipherSpi cipherSpi, java.security.Provider provider, java.lang.String transformation) { throw new RuntimeException("Stub!"); }
48 
getInstance(java.lang.String transformation)49 public static final javax.crypto.Cipher getInstance(java.lang.String transformation) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException { throw new RuntimeException("Stub!"); }
50 
getInstance(java.lang.String transformation, java.lang.String provider)51 public static final javax.crypto.Cipher getInstance(java.lang.String transformation, java.lang.String provider) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.NoSuchProviderException { throw new RuntimeException("Stub!"); }
52 
getInstance(java.lang.String transformation, java.security.Provider provider)53 public static final javax.crypto.Cipher getInstance(java.lang.String transformation, java.security.Provider provider) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException { throw new RuntimeException("Stub!"); }
54 
getProvider()55 public final java.security.Provider getProvider() { throw new RuntimeException("Stub!"); }
56 
getAlgorithm()57 public final java.lang.String getAlgorithm() { throw new RuntimeException("Stub!"); }
58 
getBlockSize()59 public final int getBlockSize() { throw new RuntimeException("Stub!"); }
60 
getOutputSize(int inputLen)61 public final int getOutputSize(int inputLen) { throw new RuntimeException("Stub!"); }
62 
getIV()63 public final byte[] getIV() { throw new RuntimeException("Stub!"); }
64 
getParameters()65 public final java.security.AlgorithmParameters getParameters() { throw new RuntimeException("Stub!"); }
66 
getExemptionMechanism()67 public final javax.crypto.ExemptionMechanism getExemptionMechanism() { throw new RuntimeException("Stub!"); }
68 
init(int opmode, java.security.Key key)69 public final void init(int opmode, java.security.Key key) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
70 
init(int opmode, java.security.Key key, java.security.SecureRandom random)71 public final void init(int opmode, java.security.Key key, java.security.SecureRandom random) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
72 
init(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params)73 public final void init(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
74 
init(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)75 public final void init(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
76 
init(int opmode, java.security.Key key, java.security.AlgorithmParameters params)77 public final void init(int opmode, java.security.Key key, java.security.AlgorithmParameters params) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
78 
init(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random)79 public final void init(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
80 
init(int opmode, java.security.cert.Certificate certificate)81 public final void init(int opmode, java.security.cert.Certificate certificate) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
82 
init(int opmode, java.security.cert.Certificate certificate, java.security.SecureRandom random)83 public final void init(int opmode, java.security.cert.Certificate certificate, java.security.SecureRandom random) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
84 
update(byte[] input)85 public final byte[] update(byte[] input) { throw new RuntimeException("Stub!"); }
86 
update(byte[] input, int inputOffset, int inputLen)87 public final byte[] update(byte[] input, int inputOffset, int inputLen) { throw new RuntimeException("Stub!"); }
88 
update(byte[] input, int inputOffset, int inputLen, byte[] output)89 public final int update(byte[] input, int inputOffset, int inputLen, byte[] output) throws javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
90 
update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)91 public final int update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
92 
update(java.nio.ByteBuffer input, java.nio.ByteBuffer output)93 public final int update(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
94 
doFinal()95 public final byte[] doFinal() throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException { throw new RuntimeException("Stub!"); }
96 
doFinal(byte[] output, int outputOffset)97 public final int doFinal(byte[] output, int outputOffset) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
98 
doFinal(byte[] input)99 public final byte[] doFinal(byte[] input) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException { throw new RuntimeException("Stub!"); }
100 
doFinal(byte[] input, int inputOffset, int inputLen)101 public final byte[] doFinal(byte[] input, int inputOffset, int inputLen) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException { throw new RuntimeException("Stub!"); }
102 
doFinal(byte[] input, int inputOffset, int inputLen, byte[] output)103 public final int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
104 
doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)105 public final int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
106 
doFinal(java.nio.ByteBuffer input, java.nio.ByteBuffer output)107 public final int doFinal(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
108 
wrap(java.security.Key key)109 public final byte[] wrap(java.security.Key key) throws javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
110 
unwrap(byte[] wrappedKey, java.lang.String wrappedKeyAlgorithm, int wrappedKeyType)111 public final java.security.Key unwrap(byte[] wrappedKey, java.lang.String wrappedKeyAlgorithm, int wrappedKeyType) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
112 
getMaxAllowedKeyLength(java.lang.String transformation)113 public static final int getMaxAllowedKeyLength(java.lang.String transformation) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
114 
getMaxAllowedParameterSpec(java.lang.String transformation)115 public static final java.security.spec.AlgorithmParameterSpec getMaxAllowedParameterSpec(java.lang.String transformation) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
116 
updateAAD(byte[] src)117 public final void updateAAD(byte[] src) { throw new RuntimeException("Stub!"); }
118 
updateAAD(byte[] src, int offset, int len)119 public final void updateAAD(byte[] src, int offset, int len) { throw new RuntimeException("Stub!"); }
120 
updateAAD(java.nio.ByteBuffer src)121 public final void updateAAD(java.nio.ByteBuffer src) { throw new RuntimeException("Stub!"); }
122 
123 @SystemApi(client = MODULE_LIBRARIES)
getCurrentSpi()124 public javax.crypto.CipherSpi getCurrentSpi() { throw new RuntimeException("Stub!"); }
125 
126 public static final int DECRYPT_MODE = 2; // 0x2
127 
128 public static final int ENCRYPT_MODE = 1; // 0x1
129 
130 public static final int PRIVATE_KEY = 2; // 0x2
131 
132 public static final int PUBLIC_KEY = 1; // 0x1
133 
134 public static final int SECRET_KEY = 3; // 0x3
135 
136 public static final int UNWRAP_MODE = 4; // 0x4
137 
138 public static final int WRAP_MODE = 3; // 0x3
139 }
140 
141