1 /*
2  * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 package sun.security.util;
27 
28 import java.security.*;
29 
30 @SuppressWarnings({"unchecked", "deprecation", "all"})
31 public class ManifestDigester {
32 
33     @android.compat.annotation.UnsupportedAppUsage
ManifestDigester(byte[] bytes)34     public ManifestDigester(byte[] bytes) {
35         throw new RuntimeException("Stub!");
36     }
37 
findSection(int offset, sun.security.util.ManifestDigester.Position pos)38     private boolean findSection(int offset, sun.security.util.ManifestDigester.Position pos) {
39         throw new RuntimeException("Stub!");
40     }
41 
isNameAttr(byte[] bytes, int start)42     private boolean isNameAttr(byte[] bytes, int start) {
43         throw new RuntimeException("Stub!");
44     }
45 
46     @android.compat.annotation.UnsupportedAppUsage
get(java.lang.String name, boolean oldStyle)47     public sun.security.util.ManifestDigester.Entry get(java.lang.String name, boolean oldStyle) {
48         throw new RuntimeException("Stub!");
49     }
50 
51     @android.compat.annotation.UnsupportedAppUsage
manifestDigest(java.security.MessageDigest md)52     public byte[] manifestDigest(java.security.MessageDigest md) {
53         throw new RuntimeException("Stub!");
54     }
55 
56     public static final java.lang.String MF_MAIN_ATTRS = "Manifest-Main-Attributes";
57 
58     private java.util.HashMap<java.lang.String, sun.security.util.ManifestDigester.Entry> entries;
59 
60     private byte[] rawBytes;
61 
62     @SuppressWarnings({"unchecked", "deprecation", "all"})
63     public static class Entry {
64 
Entry(int offset, int length, int lengthWithBlankLine, byte[] rawBytes)65         public Entry(int offset, int length, int lengthWithBlankLine, byte[] rawBytes) {
66             throw new RuntimeException("Stub!");
67         }
68 
69         @android.compat.annotation.UnsupportedAppUsage
digest(java.security.MessageDigest md)70         public byte[] digest(java.security.MessageDigest md) {
71             throw new RuntimeException("Stub!");
72         }
73 
doOldStyle( java.security.MessageDigest md, byte[] bytes, int offset, int length)74         private void doOldStyle(
75                 java.security.MessageDigest md, byte[] bytes, int offset, int length) {
76             throw new RuntimeException("Stub!");
77         }
78 
79         @android.compat.annotation.UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
digestWorkaround(java.security.MessageDigest md)80         public byte[] digestWorkaround(java.security.MessageDigest md) {
81             throw new RuntimeException("Stub!");
82         }
83 
84         int length;
85 
86         int lengthWithBlankLine;
87 
88         int offset;
89 
90         boolean oldStyle;
91 
92         byte[] rawBytes;
93     }
94 
95     @SuppressWarnings({"unchecked", "deprecation", "all"})
96     static class Position {
97 
Position()98         Position() {
99             throw new RuntimeException("Stub!");
100         }
101 
102         int endOfFirstLine;
103 
104         int endOfSection;
105 
106         int startOfNext;
107     }
108 }
109