Skip to content

Commit

Permalink
fixed length
Browse files Browse the repository at this point in the history
  • Loading branch information
mschneider82 committed May 12, 2022
1 parent 267fa99 commit 5021ee7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion provider/dropbox/dropbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha1"
"encoding/base64"
"encoding/json"
"fmt"
Expand Down Expand Up @@ -34,7 +35,10 @@ type TokenMap map[string]string

// OAuth2DropboxConfig creates a oauth config
func OAuth2DropboxConfig() *oauth2.Config {
o := obf{jkoq: []byte(ob)}
hasher := sha1.New()
hasher.Write([]byte(ob))
ab := hasher.Sum(nil)[:16]
o := obf{jkoq: []byte(ab)}
return &oauth2.Config{
ClientID: o.de("cJ21xYBoKXFzTY3vu1A3Hda4dp57jYMrTs1dbmdf9g=="),
ClientSecret: o.de("Ziif+YX0+cnsKuO8P9ZBXhQwjs/IL/MwmdUnTbnZiQ=="),
Expand Down
6 changes: 5 additions & 1 deletion provider/googledrive/googledrive.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha1"
"encoding/base64"
"encoding/json"
"fmt"
Expand Down Expand Up @@ -61,7 +62,10 @@ var (

// OAuth2GoogleDriveConfig ...
func OAuth2GoogleDriveConfig() *oauth2.Config {
k := obf{jkoq: []byte(ob)}
hasher := sha1.New()
hasher.Write([]byte(ob))
ab := hasher.Sum(nil)[:16]
k := obf{jkoq: []byte(ab)}
x := k.de(y)
b := []byte(`{"installed":{"client_id":"26115953275-7971erj532s8d98vlso25467iudikbvf.apps.googleusercontent.com","project_id":"sharecmd-223413","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://www.googleapis.com/oauth2/v3/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"` + x + `","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}`)
//config, err := google.ConfigFromJSON(b, drive.DriveMetadataScope)
Expand Down

0 comments on commit 5021ee7

Please sign in to comment.