blob: cd36870a535e05d70f24f78e40a321754ee8e709 [file] [log] [blame]
Alex Klyubin8effa362015-06-24 16:06:55 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
Chad Brubaker5e73c0e2015-03-21 22:46:43 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
Alex Klyubin8effa362015-06-24 16:06:55 -07008 * http://www.apache.org/licenses/LICENSE-2.0
Chad Brubaker5e73c0e2015-03-21 22:46:43 -07009 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.security.keymaster;
18
19import android.os.Parcel;
20import android.os.Parcelable;
21
22/**
23 * @hide
24 */
25public class KeymasterBlob implements Parcelable {
26 public byte[] blob;
27
28 public KeymasterBlob(byte[] blob) {
29 this.blob = blob;
30 }
31 public static final Parcelable.Creator<KeymasterBlob> CREATOR = new
32 Parcelable.Creator<KeymasterBlob>() {
33 public KeymasterBlob createFromParcel(Parcel in) {
34 return new KeymasterBlob(in);
35 }
36
37 public KeymasterBlob[] newArray(int length) {
38 return new KeymasterBlob[length];
39 }
40 };
41
42 protected KeymasterBlob(Parcel in) {
43 blob = in.createByteArray();
44 }
45
46 @Override
47 public int describeContents() {
48 return 0;
49 }
50
51 @Override
52 public void writeToParcel(Parcel out, int flags) {
53 out.writeByteArray(blob);
54 }
55}