01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * @author Aleksei Y. Semenov
20: * @version $Revision$
21: */package org.apache.harmony.security.tests.support;
22:
23: import java.security.PublicKey;
24:
25: /**
26: * Stub implements interface PublicKey
27: *
28: */
29:
30: public class PublicKeyStub implements PublicKey {
31:
32: private static final long serialVersionUID = 333333333L;
33:
34: String algorithm = null;
35: String format = null;
36: byte[] encoded = null;
37:
38: /**
39: * constructor
40: */
41: public PublicKeyStub(String algorithm, String format, byte[] encoded) {
42: this .algorithm = algorithm;
43: this .format = format;
44: this .encoded = encoded;
45: }
46:
47: /**
48: * returns algorithm
49: */
50: public String getAlgorithm() {
51: return algorithm;
52: }
53:
54: /**
55: * returns format
56: * @see java.security.Key#getFormat()
57: */
58: public String getFormat() {
59: return format;
60: }
61:
62: /**
63: * returns encoded
64: * @see java.security.Key#getEncoded()
65: */
66: public byte[] getEncoded() {
67: return encoded;
68: }
69: }
|