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 java.util.*;
31 import java.util.regex.*;
32 import java.security.*;
33 import javax.crypto.spec.*;
34 import sun.security.jca.*;
35 import java.nio.ReadOnlyBufferException;
36 import java.nio.ByteBuffer;
37 import java.security.spec.AlgorithmParameterSpec;
38 import java.security.Provider.Service;
39
40 @SuppressWarnings({"unchecked", "deprecation", "all"})
41 public class Cipher {
42
Cipher(javax.crypto.CipherSpi cipherSpi, java.security.Provider provider, java.lang.String transformation)43 protected Cipher(javax.crypto.CipherSpi cipherSpi, java.security.Provider provider, java.lang.String transformation) { throw new RuntimeException("Stub!"); }
44
getInstance(java.lang.String transformation)45 public static final javax.crypto.Cipher getInstance(java.lang.String transformation) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException { throw new RuntimeException("Stub!"); }
46
getInstance(java.lang.String transformation, java.lang.String provider)47 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!"); }
48
getInstance(java.lang.String transformation, java.security.Provider provider)49 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!"); }
50
getProvider()51 public final java.security.Provider getProvider() { throw new RuntimeException("Stub!"); }
52
getAlgorithm()53 public final java.lang.String getAlgorithm() { throw new RuntimeException("Stub!"); }
54
getBlockSize()55 public final int getBlockSize() { throw new RuntimeException("Stub!"); }
56
getOutputSize(int inputLen)57 public final int getOutputSize(int inputLen) { throw new RuntimeException("Stub!"); }
58
getIV()59 public final byte[] getIV() { throw new RuntimeException("Stub!"); }
60
getParameters()61 public final java.security.AlgorithmParameters getParameters() { throw new RuntimeException("Stub!"); }
62
getExemptionMechanism()63 public final javax.crypto.ExemptionMechanism getExemptionMechanism() { throw new RuntimeException("Stub!"); }
64
init(int opmode, java.security.Key key)65 public final void init(int opmode, java.security.Key key) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
66
init(int opmode, java.security.Key key, java.security.SecureRandom random)67 public final void init(int opmode, java.security.Key key, java.security.SecureRandom random) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
68
init(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params)69 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!"); }
70
init(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)71 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!"); }
72
init(int opmode, java.security.Key key, java.security.AlgorithmParameters params)73 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!"); }
74
init(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random)75 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!"); }
76
init(int opmode, java.security.cert.Certificate certificate)77 public final void init(int opmode, java.security.cert.Certificate certificate) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
78
init(int opmode, java.security.cert.Certificate certificate, java.security.SecureRandom random)79 public final void init(int opmode, java.security.cert.Certificate certificate, java.security.SecureRandom random) throws java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
80
update(byte[] input)81 public final byte[] update(byte[] input) { throw new RuntimeException("Stub!"); }
82
update(byte[] input, int inputOffset, int inputLen)83 public final byte[] update(byte[] input, int inputOffset, int inputLen) { throw new RuntimeException("Stub!"); }
84
update(byte[] input, int inputOffset, int inputLen, byte[] output)85 public final int update(byte[] input, int inputOffset, int inputLen, byte[] output) throws javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
86
update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)87 public final int update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
88
update(java.nio.ByteBuffer input, java.nio.ByteBuffer output)89 public final int update(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
90
doFinal()91 public final byte[] doFinal() throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException { throw new RuntimeException("Stub!"); }
92
doFinal(byte[] output, int outputOffset)93 public final int doFinal(byte[] output, int outputOffset) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException { throw new RuntimeException("Stub!"); }
94
doFinal(byte[] input)95 public final byte[] doFinal(byte[] input) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException { throw new RuntimeException("Stub!"); }
96
doFinal(byte[] input, int inputOffset, int inputLen)97 public final byte[] doFinal(byte[] input, int inputOffset, int inputLen) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException { throw new RuntimeException("Stub!"); }
98
doFinal(byte[] input, int inputOffset, int inputLen, byte[] output)99 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!"); }
100
doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)101 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!"); }
102
doFinal(java.nio.ByteBuffer input, java.nio.ByteBuffer output)103 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!"); }
104
wrap(java.security.Key key)105 public final byte[] wrap(java.security.Key key) throws javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException { throw new RuntimeException("Stub!"); }
106
unwrap(byte[] wrappedKey, java.lang.String wrappedKeyAlgorithm, int wrappedKeyType)107 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!"); }
108
getMaxAllowedKeyLength(java.lang.String transformation)109 public static final int getMaxAllowedKeyLength(java.lang.String transformation) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
110
getMaxAllowedParameterSpec(java.lang.String transformation)111 public static final java.security.spec.AlgorithmParameterSpec getMaxAllowedParameterSpec(java.lang.String transformation) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
112
updateAAD(byte[] src)113 public final void updateAAD(byte[] src) { throw new RuntimeException("Stub!"); }
114
updateAAD(byte[] src, int offset, int len)115 public final void updateAAD(byte[] src, int offset, int len) { throw new RuntimeException("Stub!"); }
116
updateAAD(java.nio.ByteBuffer src)117 public final void updateAAD(java.nio.ByteBuffer src) { throw new RuntimeException("Stub!"); }
118
119 @libcore.api.CorePlatformApi
getCurrentSpi()120 public javax.crypto.CipherSpi getCurrentSpi() { throw new RuntimeException("Stub!"); }
121
122 public static final int DECRYPT_MODE = 2; // 0x2
123
124 public static final int ENCRYPT_MODE = 1; // 0x1
125
126 public static final int PRIVATE_KEY = 2; // 0x2
127
128 public static final int PUBLIC_KEY = 1; // 0x1
129
130 public static final int SECRET_KEY = 3; // 0x3
131
132 public static final int UNWRAP_MODE = 4; // 0x4
133
134 public static final int WRAP_MODE = 3; // 0x3
135 }
136
137