1package com.bumptech.glide.load.engine;
2
3import com.bumptech.glide.load.Key;
4
5import java.io.UnsupportedEncodingException;
6import java.security.MessageDigest;
7
8public class OriginalEngineKey implements Key {
9    private String id;
10
11    public OriginalEngineKey(String id) {
12        this.id = id;
13    }
14
15    @Override
16    public boolean equals(Object o) {
17        if (this == o) {
18            return true;
19        }
20        if (!(o instanceof OriginalEngineKey)) {
21            return false;
22        }
23
24        OriginalEngineKey that = (OriginalEngineKey) o;
25
26        if (!id.equals(that.id)) {
27            return false;
28        }
29
30        return true;
31    }
32
33    @Override
34    public int hashCode() {
35        return id.hashCode();
36    }
37
38    @Override
39    public void updateDiskCacheKey(MessageDigest messageDigest) throws UnsupportedEncodingException {
40        messageDigest.update(id.getBytes("UTF-8"));
41    }
42}
43