Code example for Signature

Methods: toByteArray

0
     * signature as the one that inserted the OAuth providers. This is an addon 
     * on top of the fact that the calling application should not insert his 
     * token and secret. 
     */ 
    protected boolean isAuthorized(Signature s1, Signature s2) {
        return Arrays.equals(s1.toByteArray(), s2.toByteArray());
    } 
 
    protected SQLiteDatabase getDatabase() {
        return mOpenHelper.getWritableDatabase();
    } 
 
    static { 
        sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
        sUriMatcher.addURI(OAuth.AUTHORITY, "registry", REGISTRY);
        sUriMatcher.addURI(OAuth.AUTHORITY, "registry/#", REGISTRY_ID);
        sUriMatcher.addURI(OAuth.AUTHORITY, "registry/#/consumers", CONSUMERS);
        sUriMatcher.addURI(OAuth.AUTHORITY, "registry/#/consumers/#", CONSUMER_ID);
 
        sRegistryProjectionMap = new HashMap<String, String>();
        sRegistryProjectionMap.put(Registry._ID, join('.', REGISTRY_TABLE_NAME, Registry._ID));